Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.AlertsManagement to add …
Browse files Browse the repository at this point in the history
…example to version stable/2023-03-01 (#25552)

* add example

* fix typo

---------

Co-authored-by: Moshe Malka <momalka@microsoft.com>
  • Loading branch information
moshemal and Moshe Malka authored Sep 20, 2023
1 parent 13f0922 commit ae076e2
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@
"x-ms-examples": {
"Create or Update a PrometheusRuleGroup": {
"$ref": "./examples/createOrUpdatePrometheusRuleGroup.json"
},
"Create or Update a cluster centric PrometheusRuleGroup": {
"$ref": "./examples/createOrUpdateClusterCentricRuleGroup.json"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"parameters": {
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"resourceGroupName": "promResourceGroup",
"ruleGroupName": "myPrometheusRuleGroup",
"api-version": "2023-03-01",
"parameters": {
"location": "East US",
"properties": {
"description": "This is a rule group with culster centric configuration",
"interval": "PT10M",
"clusterName": "myClusterName",
"scopes": [
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace",
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myClusterName"
],
"rules": [
{
"alert": "Billing_Processing_Very_Slow",
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
"enabled": true,
"severity": 2,
"for": "PT5M",
"labels": {
"team": "prod"
},
"annotations": {
"annotationName1": "annotationValue1"
},
"resolveConfiguration": {
"autoResolved": true,
"timeToResolve": "PT10M"
},
"actions": []
}
]
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/promResourceGroup/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup",
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
"location": "East US",
"properties": {
"description": "This is a rule group with culster centric configuration",
"interval": "PT10M",
"clusterName": "myClusterName",
"scopes": [
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace",
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myClusterName"
],
"rules": [
{
"alert": "Billing_Processing_Very_Slow",
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
"enabled": true,
"severity": 2,
"for": "PT5M",
"labels": {
"team": "prod"
},
"annotations": {
"annotationName1": "annotationValue1"
},
"resolveConfiguration": {
"autoResolved": true,
"timeToResolve": "PT10M"
},
"actions": []
}
]
}
}
},
"201": {
"headers": {},
"body": {
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/promResourceGroup/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup",
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
"location": "East US",
"properties": {
"description": "This is a rule group with culster centric configuration",
"interval": "PT10M",
"clusterName": "myClusterName",
"scopes": [
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace",
"/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myClusterName"
],
"rules": [
{
"alert": "Billing_Processing_Very_Slow",
"expression": "job_type:billing_jobs_duration_seconds:99p5m > 30",
"enabled": true,
"severity": 2,
"for": "PT5M",
"labels": {
"team": "prod"
},
"annotations": {
"annotationName1": "annotationValue1"
},
"resolveConfiguration": {
"autoResolved": true,
"timeToResolve": "PT10M"
},
"actions": []
}
]
}
}
}
}
}

0 comments on commit ae076e2

Please sign in to comment.