alerts_summaries
Creates, updates, deletes, gets or lists an alerts_summaries
resource.
Overview
Name | alerts_summaries |
Type | Resource |
Id | azure.alerts_management.alerts_summaries |
Fields
The following fields are returned by SELECT
queries:
- get
OK. Alert summary returned.
Name | Datatype | Description |
---|---|---|
id | string | Azure resource Id |
name | string | Azure resource name |
properties | object | Group the result set. |
type | string | Azure resource type |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | scope , groupby | includeSmartGroupsCount , targetResource , targetResourceType , targetResourceGroup , monitorService , monitorCondition , severity , alertState , alertRule , timeRange , customTimeRange | Get a summarized count of your alerts grouped by various parameters (e.g. grouping by 'Severity' returns the count of alerts for each severity). |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
groupby | string | This parameter allows the result set to be grouped by input fields (Maximum 2 comma separated fields supported). For example, groupby=severity or groupby=severity,alertstate. |
scope | string | scope here is resourceId for which alert is created. |
alertRule | string | Filter by specific alert rule. Default value is to select all. |
alertState | string | Filter by state of the alert instance. Default value is to select all. |
customTimeRange | string | Filter by custom time range in the format <start-time>/<end-time> where time is in (ISO-8601 format)'. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none. |
includeSmartGroupsCount | boolean | Include count of the SmartGroups as part of the summary. Default value is 'false'. |
monitorCondition | string | Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all. |
monitorService | string | Filter by monitor service which generates the alert instance. Default value is select all. |
severity | string | Filter by severity. Default value is select all. |
targetResource | string | Filter by target resource( which is full ARM ID) Default value is select all. |
targetResourceGroup | string | Filter by target resource group name. Default value is select all. |
targetResourceType | string | Filter by target resource type. Default value is select all. |
timeRange | string | Filter by time range by below listed values. Default value is 1 day. |
SELECT
examples
- get
Get a summarized count of your alerts grouped by various parameters (e.g. grouping by 'Severity' returns the count of alerts for each severity).
SELECT
id,
name,
properties,
type
FROM azure.alerts_management.alerts_summaries
WHERE scope = '{{ scope }}' -- required
AND groupby = '{{ groupby }}' -- required
AND includeSmartGroupsCount = '{{ includeSmartGroupsCount }}'
AND targetResource = '{{ targetResource }}'
AND targetResourceType = '{{ targetResourceType }}'
AND targetResourceGroup = '{{ targetResourceGroup }}'
AND monitorService = '{{ monitorService }}'
AND monitorCondition = '{{ monitorCondition }}'
AND severity = '{{ severity }}'
AND alertState = '{{ alertState }}'
AND alertRule = '{{ alertRule }}'
AND timeRange = '{{ timeRange }}'
AND customTimeRange = '{{ customTimeRange }}'
;