-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added AzureMonitor V1 task for querying new Azure Monitor Alerts.
- Loading branch information
Showing
9 changed files
with
318 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
Tasks/AzureMonitorV0/Strings/resources.resjson/en-US/resources.resjson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
Tasks/AzureMonitorV1/Strings/resources.resjson/en-US/resources.resjson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"loc.friendlyName": "Query Azure Monitor Alerts", | ||
"loc.helpMarkDown": "[More Information](https://go.microsoft.com/fwlink/?linkid=870240)", | ||
"loc.description": "Observe the configured Azure monitor rules for active alerts.", | ||
"loc.instanceNameFormat": "Query Azure Monitor alerts", | ||
"loc.group.displayName.advanced": "Advanced", | ||
"loc.input.label.connectedServiceNameARM": "Azure subscription", | ||
"loc.input.help.connectedServiceNameARM": "Select an Azure Resource Manager subscription to monitor.", | ||
"loc.input.label.ResourceGroupName": "Resource group", | ||
"loc.input.help.ResourceGroupName": "Provide the name of a resource group to monitor.", | ||
"loc.input.label.resource": "Resource", | ||
"loc.input.help.resource": "Select Azure resource to monitor.", | ||
"loc.input.label.severity ": "Severity ", | ||
"loc.input.help.severity ": "Filter by severity. Default value is select all.", | ||
"loc.input.label.timeRange": "Time range", | ||
"loc.input.help.timeRange": "Filter by time range. Default value is 1 hour.", | ||
"loc.input.label.alertState": "Alert state", | ||
"loc.input.help.alertState": "Filter by state of the alert instance. Default value is to select all." | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
{ | ||
"id": "99A72E7F-25E4-4576-BF38-22A42B995ED8", | ||
"name": "AzureMonitor", | ||
"friendlyName": "Query Azure Monitor Alerts", | ||
"description": "Observe the configured Azure monitor rules for active alerts.", | ||
"author": "Microsoft Corporation", | ||
"helpMarkDown": "[More Information](https://go.microsoft.com/fwlink/?linkid=870240)", | ||
"category": "Utility", | ||
"visibility": [ | ||
"Build", | ||
"Release" | ||
], | ||
"runsOn": [ | ||
"Server", | ||
"ServerGate" | ||
], | ||
"version": { | ||
"Major": 1, | ||
"Minor": 0, | ||
"Patch": 0 | ||
}, | ||
"instanceNameFormat": "Query Azure Monitor alerts", | ||
"groups": [ | ||
{ | ||
"name": "advanced", | ||
"displayName": "Advanced", | ||
"isExpanded": false | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"name": "connectedServiceNameARM", | ||
"type": "connectedService:AzureRM", | ||
"label": "Azure subscription", | ||
"defaultValue": "", | ||
"required": "true", | ||
"helpMarkDown": "Select an Azure Resource Manager subscription to monitor." | ||
}, | ||
{ | ||
"name": "ResourceGroupName", | ||
"type": "pickList", | ||
"label": "Resource group", | ||
"required": true, | ||
"properties": { | ||
"EditableOptions": "True" | ||
}, | ||
"helpMarkDown": "Provide the name of a resource group to monitor." | ||
}, | ||
{ | ||
"name": "resource", | ||
"type": "pickList", | ||
"label": "Resource", | ||
"required": false, | ||
"properties": { | ||
"MultiSelectFlatList": "True" | ||
}, | ||
"helpMarkDown": "Select Azure resource to monitor." | ||
}, | ||
{ | ||
"name": "severity ", | ||
"type": "pickList", | ||
"label": "Severity ", | ||
"required": false, | ||
"defaultValue": "Sev0,Sev1,Sev2,Sev3,Sev4", | ||
"options": { | ||
"Sev0": "Sev0", | ||
"Sev1": "Sev1", | ||
"Sev2": "Sev2", | ||
"Sev3": "Sev3", | ||
"Sev4": "Sev4" | ||
}, | ||
"properties": { | ||
"MultiSelectFlatList": "True", | ||
"EditableOptions": "True" | ||
}, | ||
"helpMarkDown": "Filter by severity. Default value is select all.", | ||
"groupName": "advanced" | ||
}, | ||
{ | ||
"name": "timeRange", | ||
"type": "pickList", | ||
"label": "Time range", | ||
"required": false, | ||
"defaultValue": "1h", | ||
"options": { | ||
"1h": "Past hour", | ||
"1d": "Past 24 hours", | ||
"7d": "Past 7 days", | ||
"30d": "Past 30 days" | ||
}, | ||
"properties": { | ||
"EditableOptions": "false" | ||
}, | ||
"helpMarkDown": "Filter by time range. Default value is 1 hour.", | ||
"groupName": "advanced" | ||
}, | ||
{ | ||
"name": "alertState", | ||
"type": "pickList", | ||
"label": "Alert state", | ||
"required": false, | ||
"defaultValue": "Acknowledged,Closed,New", | ||
"options": { | ||
"New": "New", | ||
"Acknowledged": "Acknowledged", | ||
"Closed": "Closed" | ||
}, | ||
"properties": { | ||
"MultiSelectFlatList": "True", | ||
"EditableOptions": "True" | ||
}, | ||
"helpMarkDown": "Filter by state of the alert instance. Default value is to select all.", | ||
"groupName": "advanced" | ||
} | ||
], | ||
"dataSourceBindings": [ | ||
{ | ||
"target": "ResourceGroupName", | ||
"endpointId": "$(connectedServiceNameARM)", | ||
"dataSourceName": "AzureResourceGroups" | ||
}, | ||
{ | ||
"target": "resource", | ||
"endpointId": "$(connectedServiceNameARM)", | ||
"dataSourceName": "AzureRMResourcesInRG", | ||
"parameters": { | ||
"ResourceGroupName": "$(ResourceGroupName)" | ||
}, | ||
"resultTemplate": "{ \"Value\" : \"{{{type}}}/{{{name}}}\", \"DisplayValue\" : \"{{{name}}} [{{{type}}}]\" }" | ||
} | ||
], | ||
"execution": { | ||
"HttpRequest": { | ||
"Execute": { | ||
"EndpointId": "$(connectedServiceNameARM)", | ||
"EndpointUrl": "$(endpoint.url)/subscriptions/{{subscriptionId}}/providers/Microsoft.AlertsManagement/alerts?api-version=2018-05-05&monitorCondition=Fired&targetResourceGroup={{ResourceGroupName}}&timeRange={{timeRange}}&alertState={{alertState}}&severity={{severity}}{{#if resource}}&targetResource={{#splitAndIterate ',' resource}}/subscriptions/{{#..}}{{subscriptionId}}{{/..}}/resourcegroups/{{#..}}{{ResourceGroupName}}{{/..}}/providers/{{this}},{{/splitAndIterate}}{{/if}}", | ||
"Method": "GET", | ||
"Body": "", | ||
"Headers": "", | ||
"WaitForCompletion": "false", | ||
"Expression": "eq(count(jsonpath('$.value[*]')), 0)" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
{ | ||
"id": "99A72E7F-25E4-4576-BF38-22A42B995ED8", | ||
"name": "AzureMonitor", | ||
"friendlyName": "ms-resource:loc.friendlyName", | ||
"description": "ms-resource:loc.description", | ||
"author": "Microsoft Corporation", | ||
"helpMarkDown": "ms-resource:loc.helpMarkDown", | ||
"category": "Utility", | ||
"visibility": [ | ||
"Build", | ||
"Release" | ||
], | ||
"runsOn": [ | ||
"Server", | ||
"ServerGate" | ||
], | ||
"version": { | ||
"Major": 1, | ||
"Minor": 0, | ||
"Patch": 0 | ||
}, | ||
"instanceNameFormat": "ms-resource:loc.instanceNameFormat", | ||
"groups": [ | ||
{ | ||
"name": "advanced", | ||
"displayName": "ms-resource:loc.group.displayName.advanced", | ||
"isExpanded": false | ||
} | ||
], | ||
"inputs": [ | ||
{ | ||
"name": "connectedServiceNameARM", | ||
"type": "connectedService:AzureRM", | ||
"label": "ms-resource:loc.input.label.connectedServiceNameARM", | ||
"defaultValue": "", | ||
"required": "true", | ||
"helpMarkDown": "ms-resource:loc.input.help.connectedServiceNameARM" | ||
}, | ||
{ | ||
"name": "ResourceGroupName", | ||
"type": "pickList", | ||
"label": "ms-resource:loc.input.label.ResourceGroupName", | ||
"required": true, | ||
"properties": { | ||
"EditableOptions": "True" | ||
}, | ||
"helpMarkDown": "ms-resource:loc.input.help.ResourceGroupName" | ||
}, | ||
{ | ||
"name": "resource", | ||
"type": "pickList", | ||
"label": "ms-resource:loc.input.label.resource", | ||
"required": false, | ||
"properties": { | ||
"MultiSelectFlatList": "True" | ||
}, | ||
"helpMarkDown": "ms-resource:loc.input.help.resource" | ||
}, | ||
{ | ||
"name": "severity ", | ||
"type": "pickList", | ||
"label": "ms-resource:loc.input.label.severity ", | ||
"required": false, | ||
"defaultValue": "Sev0,Sev1,Sev2,Sev3,Sev4", | ||
"options": { | ||
"Sev0": "Sev0", | ||
"Sev1": "Sev1", | ||
"Sev2": "Sev2", | ||
"Sev3": "Sev3", | ||
"Sev4": "Sev4" | ||
}, | ||
"properties": { | ||
"MultiSelectFlatList": "True", | ||
"EditableOptions": "True" | ||
}, | ||
"helpMarkDown": "ms-resource:loc.input.help.severity ", | ||
"groupName": "advanced" | ||
}, | ||
{ | ||
"name": "timeRange", | ||
"type": "pickList", | ||
"label": "ms-resource:loc.input.label.timeRange", | ||
"required": false, | ||
"defaultValue": "1h", | ||
"options": { | ||
"1h": "Past hour", | ||
"1d": "Past 24 hours", | ||
"7d": "Past 7 days", | ||
"30d": "Past 30 days" | ||
}, | ||
"properties": { | ||
"EditableOptions": "false" | ||
}, | ||
"helpMarkDown": "ms-resource:loc.input.help.timeRange", | ||
"groupName": "advanced" | ||
}, | ||
{ | ||
"name": "alertState", | ||
"type": "pickList", | ||
"label": "ms-resource:loc.input.label.alertState", | ||
"required": false, | ||
"defaultValue": "Acknowledged,Closed,New", | ||
"options": { | ||
"New": "New", | ||
"Acknowledged": "Acknowledged", | ||
"Closed": "Closed" | ||
}, | ||
"properties": { | ||
"MultiSelectFlatList": "True", | ||
"EditableOptions": "True" | ||
}, | ||
"helpMarkDown": "ms-resource:loc.input.help.alertState", | ||
"groupName": "advanced" | ||
} | ||
], | ||
"dataSourceBindings": [ | ||
{ | ||
"target": "ResourceGroupName", | ||
"endpointId": "$(connectedServiceNameARM)", | ||
"dataSourceName": "AzureResourceGroups" | ||
}, | ||
{ | ||
"target": "resource", | ||
"endpointId": "$(connectedServiceNameARM)", | ||
"dataSourceName": "AzureRMResourcesInRG", | ||
"parameters": { | ||
"ResourceGroupName": "$(ResourceGroupName)" | ||
}, | ||
"resultTemplate": "{ \"Value\" : \"{{{type}}}/{{{name}}}\", \"DisplayValue\" : \"{{{name}}} [{{{type}}}]\" }" | ||
} | ||
], | ||
"execution": { | ||
"HttpRequest": { | ||
"Execute": { | ||
"EndpointId": "$(connectedServiceNameARM)", | ||
"EndpointUrl": "$(endpoint.url)/subscriptions/{{subscriptionId}}/providers/Microsoft.AlertsManagement/alerts?api-version=2018-05-05&monitorCondition=Fired&targetResourceGroup={{ResourceGroupName}}&timeRange={{timeRange}}&alertState={{alertState}}&severity={{severity}}{{#if resource}}&targetResource={{#splitAndIterate ',' resource}}/subscriptions/{{#..}}{{subscriptionId}}{{/..}}/resourcegroups/{{#..}}{{ResourceGroupName}}{{/..}}/providers/{{this}},{{/splitAndIterate}}{{/if}}", | ||
"Method": "GET", | ||
"Body": "", | ||
"Headers": "", | ||
"WaitForCompletion": "false", | ||
"Expression": "eq(count(jsonpath('$.value[*]')), 0)" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters