Azure Deployment Manager (ADM) allows you to manage a staged roll-out for safely deploying complex applications.
Use Datadog to create a health check for the Azure Deployment Manager, and to stop your deployment if issues are detected.
To use Datadog as a health check for ADM, you need an active Datadog account and an active instance of Azure Deployment Manager.
Start by setting up monitors in Datadog for your deployment. Start with a monitor for each region. Depending on the complexity of your application, you may want to have monitors for different parts of the deployment in each region. Completing the Tutorial: Use Azure Deployment Manager with Resource Manager templates may help you decide where to monitor. For monitor ideas, check out the blog.
If you end up with multiple monitors for each region, create a composite monitor for each rollout step or region. Each composite monitor is a logical combination of other monitors that together indicate the overall status of a deployment step.
Next, configure Datadog as a health check within the Azure Deployment Manager topology as a part of the rollout. Set these health check steps as dependencies between the deployment steps. Use the template, and replace <API_KEY> and <APP_KEY> with your Datadog API and application keys. Create a section in resources for each monitor (or composite monitor) you just created and replace <MONITOR_ID> with the monitor IDs. It is possible to add multiple checks within a health check step, but Datadog recommends you create one check per health check step, and then create additional health check steps for each composite monitor. If you are setting the check with something besides a composite monitor, be sure to update the regex accordingly.
When performing the health check step for a phase of the rollout, Azure Deployment Manager queries the Datadog Monitor API for the status of the composite monitor identified in the health check step for that phase of the deployment.
Azure Deployment Manager parses the response using the regex provided in the template to identify if it contains the phrase overall_status: OK.
If overall_status: OK is found, the check is considered healthy. If the status is Warn, No Data, or Alert, then the check is considered unhealthy, and Azure Deployment Manager stops the deployment.
The Azure Deployment Manager does not report any metrics.
The Azure Deployment Manager does not include any events.
The Azure Deployment Manager does not include any service checks.