Skip to content

Commit

Permalink
[Monitoring] Add metric alerts api 2018-03-01 (#2620)
Browse files Browse the repository at this point in the history
* [Monitor] adding metricalerts api specifications

* case sensativity issue resolved

* required properties corrections

* required properties corrections

* changed to reference errorresponce

* changed to reference errorresponce

* Switching to stable api version

* fix operation id

* fix type definition

* remove old property

* fix type definitions

* changed to enum

* Change flatten flag to false

* Update with review feedback

* update enums

* review feedback corrections, typos

* fix examples

* spelling error in comment
  • Loading branch information
LeoVannelli authored and fearthecowboy committed Mar 23, 2018
1 parent ace5947 commit dc201c0
Show file tree
Hide file tree
Showing 9 changed files with 1,407 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"parameters": {
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
"resourceGroupName": "gigtest",
"ruleName": "chiricutin",
"api-version": "2018-03-01",
"parameters": {
"tags": {},
"properties": {
"description": "This is the description of the rule1",
"severity": 3,
"enabled": true,
"scopes": [
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
],
"evaluationFrequency": "Pt1m",
"windowSize": "Pt15m",
"criteria": {
"odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
"allOf": [
{
"name": "High_CPU_80",
"metricName": "\\Processor(_Total)\\% Processor Time",
"dimensions": [
],
"operator": "GreaterThan",
"threshold": 80.50,
"timeAggregation": "Average"
}
]
},
"actions": [
{
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2",
"webhookProperties": {
"key11": "value11",
"key12": "value12"
}
}
]
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin",
"type": "Microsoft.Insights/metricAlerts",
"location": "global",
"tags": {
"hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource"
},
"properties": {
"description": "This is the description of the rule1",
"severity": 3,
"enabled": true,
"scopes": [
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
],
"evaluationFrequency": "Pt1m",
"windowSize": "Pt15m",
"criteria": {
"odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
"allOf": [
{
"name": "High_CPU_80",
"metricName": "\\Processor(_Total)\\% Processor Time",
"dimensions": [
],
"operator": "GreaterThan",
"threshold": 80.50,
"timeAggregation": "Average"
}
]
},
"actions": [
{
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2",
"webhookProperties": {
"key11": "value11",
"key12": "value12"
}
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"parameters": {
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
"resourceGroupName": "gigtest",
"ruleName": "chiricutin",
"api-version": "2018-03-01",
"parameters": {
"location": "global",
"tags": {},
"properties": {
"description": "This is the description of the rule1",
"severity": 3,
"enabled": true,
"scopes": [
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
],
"evaluationFrequency": "Pt1m",
"windowSize": "Pt15m",
"criteria": {
"odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
"allOf": [
{
"name": "High_CPU_80",
"metricName": "\\Processor(_Total)\\% Processor Time",
"dimensions": [
],
"operator": "GreaterThan",
"threshold": 80.50,
"timeAggregation": "Average"
}
]
},
"actions": [
{
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2",
"webhookProperties": {
"key11": "value11",
"key12": "value12"
}
}
]
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin",
"type": "Microsoft.Insights/metricAlerts",
"location": "global",
"tags": {
"hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource"
},
"properties": {
"description": "This is the description of the rule1",
"severity": 3,
"enabled": true,
"scopes": [
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
],
"evaluationFrequency": "Pt1m",
"windowSize": "Pt15m",
"criteria": {
"odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
"allOf": [
{
"name": "High_CPU_80",
"metricName": "\\Processor(_Total)\\% Processor Time",
"dimensions": [
],
"operator": "GreaterThan",
"threshold": 80.50,
"timeAggregation": "Average"
}
]
},
"actions": [
{
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2",
"webhookProperties": {
"key11": "value11",
"key12": "value12"
}
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
"resourceGroupName": "gigtest",
"ruleName": "chiricutin",
"api-version": "2018-03-01"
},
"responses": {
"200": {
"headers": {},
"body": null
},
"204": {
"headers": {},
"body": null
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"parameters": {
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
"resourceGroupName": "gigtest",
"ruleName": "chiricutin",
"api-version": "2018-03-01"
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin",
"type": "Microsoft.Insights/metricAlerts",
"location": "global",
"tags": {
"hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource"
},
"properties": {
"description": "This is the description of the rule1",
"severity": 3,
"enabled": true,
"scopes": [
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
],
"evaluationFrequency": "Pt1m",
"windowSize": "Pt15m",
"criteria": {
"odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria",
"allOf": [
{
"name": "High_CPU_80",
"metricName": "\\Processor(_Total)\\% Processor Time",
"dimensions": [
],
"operator": "GreaterThan",
"threshold": 80.50,
"timeAggregation": "Average"
}
]
},
"actions": [
{
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2",
"webhookProperties": {
"key11": "value11",
"key12": "value12"
}
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"parameters": {
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7",
"resourceGroupName": "gigtest",
"ruleName": "chiricutin",
"api-version": "2018-03-01"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"id": "/subscriptions/009f6022-67ec-423e-9aa7-691182870588/resourceGroups/EastUs/providers/microsoft.insights/metricAlerts/LeoAlert_custom1",
"name": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l",
"type": "Microsoft.Insights/metricAlerts/status",
"properties": {
"dimensions": {
"resourceId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
},
"status": "Healthy",
"timestamp": "2018-01-17T20:17:25.6293237Z"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parameters": {
"subscriptionId": "009f6022-67ec-423e-9aa7-691182870588",
"resourceGroupName": "EastUs",
"ruleName": "custom1",
"statusName": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l",
"api-version": "2018-03-01"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"id": "/subscriptions/009f6022-67ec-423e-9aa7-691182870588/resourceGroups/EastUs/providers/microsoft.insights/metricAlerts/custom1",
"name": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l",
"type": "Microsoft.Insights/metricAlerts/status",
"properties": {
"dimensions": {
"resourceId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
},
"status": "Healthy",
"timestamp": "2018-01-17T20:17:25.6293237Z"
}
}
]
}
}
}
}
Loading

0 comments on commit dc201c0

Please sign in to comment.