CmdID

CmdID / az / az alerts-management / az alerts-management prometheus-rule-group

az alerts-management prometheus-rule-group create

Create a Prometheus rule group definition. Azure CLI extensions reference

1 example 8 options Its page in the Azure CLI extensions reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from the Azure CLI, each command read by CmdID

Create a Prometheus rule group definition.

az alerts-management prometheus-rule-group create -n TestPrometheusRuleGroup -g TestResourceGroup -l westus --enabled --description "test" --interval PT10M --scopes "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/testrg/providers/microsoft.monitor/accounts/testaccount" --rules [{"record":"test","expression":"test","labels":{"team":"prod"}},{"alert":"Billing_Processing_Very_Slow","expression":"test","enabled":"true","severity":2,"for":"PT5M","labels":{"team":"prod"},"annotations":{"annotationName1":"annotationValue1"},"resolveConfiguration":{"autoResolved":"true","timeToResolve":"PT10M"},"actions":[{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/microsoft.insights/actionGroups/test-action-group-name1","actionProperties":{"key11":"value11","key12":"value12"}},{"actionGroupId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testrg/providers/microsoft.insights/actionGroups/test-action-group-name2","actionProperties":{"key21":"value21","key22":"value22"}}]}]Identify
-nThe name of the rule group.
-gName of resource group.
-lLocation.
--enabledEnable/disable rule group.
--descriptionRule group description.
--intervalThe interval in which to run the Prometheus rule group represented in ISO 8601 duration format.
--scopesTarget Azure Monitor workspaces resource ids.
--rulesDefines the rules in the Prometheus rule group.

Options

8 in the Azure CLI extensions reference
--cluster-nameApply rule to data from a specific cluster.
--descriptionRule group description.
--enabledEnable/disable rule group.
--intervalThe interval in which to run the Prometheus rule group represented in ISO 8601 duration format.
--name, -nThe name of the rule group.
--rulesDefines the rules in the Prometheus rule group.
--scopesTarget Azure Monitor workspaces resource ids.
--tagsResource tags.