Setting real-time alerts in Azure
Suggest editsCloud Service provides a wide range of metrics for your clusters. For details, see Metrics details. You can use a Log Analytics query to trigger a real-time alerts based on these metrics.
This example sets up an alert that's triggered when one of your cluster groups goes down. Assume that your cluster group has an ID = p-gjlmcos8n7
and is on a subscription called development
.
In the Azure portal, search for and select Alerts. On the Alerts page, you can see the metrics that Cloud Service collects from your environment.
Select + Create and select Alert rule to create new alert rule.
Select + Select scope. Under Select a resource:
Select your Azure subscription (development) in the Filter by subscription field.
Select Log Analytics workspaces in the Filter by resource type field.
Select the Azure region of your cluster in the Filter by location field.
Cloud Service creates a Log Analytics workspace for each region in your Azure subscription. Select the Log Analytics workspace for your region, and select Done. The right column shows the regions.
In the Condition tab:
To set when the alert rule is triggered, Select Add condition.
To monitor the Log Analytics service, select Custom log search.
To trigger an alert when the database cluster isn't detected, enter the following query:
The query programs the alert to check for the
cnp_collector_up
metric for the p-gjlmcos8n7 database cluster.After running the query, select Continue editing alert.
Design the alert logic based on the number of results. Under Alert logic:
Set Operator to Equals to.
In the Threshold value field, enter 0.
The alert is triggered when the database cluster is unavailable and there are no metrics of
cnp_collector_up
. The alert can indicate a monitoring problem or a critical error.
In the Details tab, create the alert rule name.
Select Review + Create.
Select Create.
Could this page be better? Report a problem or suggest an addition!