Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New api version 2021-02-01-preview #12988

Closed
wants to merge 9 commits into from
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
{
"parameters": {
"subscriptionId": "dd4bfc94-a096-412b-9c43-4bd13e35afbc",
"resourceGroupName": "QueryResourceGroupName",
"ruleName": "perf",
"api-version": "2021-02-01-preview",
"parameters": {
"location": "Global",
"properties": {
"description": "Performance rule",
"severity": 4,
"enabled": true,
"evaluationFrequency": "PT5M",
"scopes": [
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"
],
"windowSize": "PT10M",
"criteria": {
"allOf": [
{
"query": "Perf | where ObjectName == \"Processor\"",
"timeAggregation": "Average",
"metricMeasureColumn": "% Processor Time",
"resourceIdColumn": "resourceId",
"dimensions": [
{
"name": "ComputerIp",
"operator": "Exclude",
"values": [
"192.168.1.1"
]
},
{
"name": "OSType",
"operator": "Include",
"values": [
"*"
]
}
],
"operator": "GreaterThan",
"threshold": 70,
"failingPeriods": {
"numberOfEvaluationPeriods": 1,
"minFailingPeriodsToAlert": 1
}
}
]
},
"muteActionsDuration": "PT30M",
"actions": [
{
"actionGroupId": "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
"webHookProperties": {
"key11": "value11",
"key12": "value12"
}
}
]
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/dd4bfc94-a096-412b-9c43-4bd13e35afbc/resourcegroups/QueryResourceGroupName/providers/microsoft.insights/scheduledqueryrules/perf",
"name": "perf",
"type": "microsoft.insights/scheduledqueryrules",
"location": "Global",
"tags": {},
"properties": {
"description": "Performance rule",
"severity": 4,
"enabled": true,
"evaluationFrequency": "PT5M",
"scopes": [
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"
],
"windowSize": "PT10M",
"criteria": {
"allOf": [
{
"query": "Perf | where ObjectName == \"Processor\"",
"timeAggregation": "Average",
"metricMeasureColumn": "% Processor Time",
"resourceIdColumn": "resourceId",
"dimensions": [
{
"name": "ComputerIp",
"operator": "Exclude",
"values": [
"192.168.1.1"
]
},
{
"name": "OSType",
"operator": "Include",
"values": [
"*"
]
}
],
"operator": "GreaterThan",
"threshold": 70,
"failingPeriods": {
"numberOfEvaluationPeriods": 1,
"minFailingPeriodsToAlert": 1
}
}
]
},
"muteActionsDuration": "PT30M",
"actions": [
{
"actionGroupId": "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
"webHookProperties": {
"key11": "value11",
"key12": "value12"
}
}
]
}
}
},
"201": {
"headers": {},
"body": {
"id": "/subscriptions/dd4bfc94-a096-412b-9c43-4bd13e35afbc/resourcegroups/QueryResourceGroupName/providers/microsoft.insights/scheduledqueryrules/perf",
"name": "perf",
"type": "microsoft.insights/scheduledqueryrules",
"location": "Global",
"tags": {},
"properties": {
"description": "Performance rule",
"severity": 4,
"enabled": true,
"evaluationFrequency": "PT5M",
"scopes": [
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"
],
"windowSize": "PT10M",
"criteria": {
"allOf": [
{
"query": "Perf | where ObjectName == \"Processor\"",
"timeAggregation": "Average",
"metricMeasureColumn": "% Processor Time",
"resourceIdColumn": "resourceId",
"dimensions": [
{
"name": "ComputerIp",
"operator": "Exclude",
"values": [
"192.168.1.1"
]
},
{
"name": "OSType",
"operator": "Include",
"values": [
"*"
]
}
],
"operator": "GreaterThan",
"threshold": 70,
"failingPeriods": {
"numberOfEvaluationPeriods": 1,
"minFailingPeriodsToAlert": 1
}
}
]
},
"muteActionsDuration": "PT30M",
"actions": [
{
"actionGroupId": "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
"webHookProperties": {
"key11": "value11",
"key12": "value12"
}
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
{
"parameters": {
"subscriptionId": "dd4bfc94-a096-412b-9c43-4bd13e35afbc",
"resourceGroupName": "QueryResourceGroupName",
"ruleName": "heartbeat",
"api-version": "2021-02-01-preview",
"parameters": {
"location": "Global",
"properties": {
"description": "Health check rule",
"severity": 4,
"enabled": true,
"evaluationFrequency": "PT5M",
"scopes": [
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"
],
"targetResourceTypes": [
"Microsoft.Compute/virtualMachines"
],
"windowSize": "PT10M",
"criteria": {
"allOf": [
{
"query": "Heartbeat",
"timeAggregation": "Count",
"dimensions": [],
"operator": "GreaterThan",
"threshold": 360,
"failingPeriods": {
"numberOfEvaluationPeriods": 1,
"minFailingPeriodsToAlert": 1
}
}
]
},
"muteActionsDuration": "PT30M",
"actions": [
{
"actionGroupId": "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
"webHookProperties": {
"key11": "value11",
"key12": "value12"
}
}
]
}
}
},
"responses": {
"200": {
"headers": {},
"body": {
"id": "/subscriptions/dd4bfc94-a096-412b-9c43-4bd13e35afbc/resourcegroups/QueryResourceGroupName/providers/microsoft.insights/scheduledqueryrules/heartbeat",
"name": "heartbeat",
"type": "microsoft.insights/scheduledqueryrules",
"location": "Global",
"tags": {},
"properties": {
"description": "Health check rule",
"severity": 4,
"enabled": true,
"evaluationFrequency": "PT5M",
"scopes": [
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"
],
"targetResourceTypes": [
"Microsoft.Compute/virtualMachines"
],
"windowSize": "PT10M",
"criteria": {
"allOf": [
{
"query": "Heartbeat",
"timeAggregation": "Count",
"dimensions": [],
"operator": "GreaterThan",
"threshold": 360,
"failingPeriods": {
"numberOfEvaluationPeriods": 1,
"minFailingPeriodsToAlert": 1
}
}
]
},
"muteActionsDuration": "PT30M",
"actions": [
{
"actionGroupId": "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
"webHookProperties": {
"key11": "value11",
"key12": "value12"
}
}
]
}
}
},
"201": {
"headers": {},
"body": {
"id": "/subscriptions/dd4bfc94-a096-412b-9c43-4bd13e35afbc/resourcegroups/QueryResourceGroupName/providers/microsoft.insights/scheduledqueryrules/heartbeat",
"name": "heartbeat",
"type": "microsoft.insights/scheduledqueryrules",
"location": "eastus",
"tags": {},
"properties": {
"description": "Health check rule",
"severity": 4,
"enabled": true,
"evaluationFrequency": "PT5M",
"scopes": [
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"
],
"targetResourceTypes": [
"Microsoft.Compute/virtualMachines"
],
"windowSize": "PT10M",
"criteria": {
"allOf": [
{
"query": "Heartbeat",
"timeAggregation": "Count",
"dimensions": [],
"operator": "GreaterThan",
"threshold": 360,
"failingPeriods": {
"numberOfEvaluationPeriods": 1,
"minFailingPeriodsToAlert": 1
}
}
]
},
"muteActionsDuration": "PT30M",
"actions": [
{
"actionGroupId": "/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
"webHookProperties": {
"key11": "value11",
"key12": "value12"
}
}
]
}
}
}
}
}
Loading