Smart Groups - Get All

Get all Smart Groups within a specified subscription
List all the Smart Groups within a specified subscription.

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups?api-version=2019-05-05-preview
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups?targetResource={targetResource}&targetResourceGroup={targetResourceGroup}&targetResourceType={targetResourceType}&monitorService={monitorService}&monitorCondition={monitorCondition}&severity={severity}&smartGroupState={smartGroupState}&timeRange={timeRange}&pageCount={pageCount}&sortBy={sortBy}&sortOrder={sortOrder}&api-version=2019-05-05-preview

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

api-version

client API version

monitorCondition
query

MonitorCondition

Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.

monitorService
query

MonitorService

Filter by monitor service which generates the alert instance. Default value is select all.

pageCount
query

integer

int64

Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the "includeContent" filter is selected, maximum value allowed is 25. Default value is 25.

severity
query

Severity

Filter by severity. Default value is select all.

smartGroupState
query

AlertState

Filter by state of the smart group. Default value is to select all.

sortBy
query

SmartGroupsSortByFields

Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'.

sortOrder
query

SortOrder

Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.

targetResource
query

string

Filter by target resource( which is full ARM ID) Default value is select all.

targetResourceGroup
query

string

Filter by target resource group name. Default value is select all.

targetResourceType
query

string

Filter by target resource type. Default value is select all.

timeRange
query

TimeRange

Filter by time range by below listed values. Default value is 1 day.

Responses

Name Type Description
200 OK

smartGroupsList

OK. Returns list of all smartGroups.

Other Status Codes

errorResponse

Error response describing why the operation failed.

Examples

List

Sample Request

GET https://management.azure.com/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups?api-version=2019-05-05-preview

Sample Response

{
  "nextLink": null,
  "value": [
    {
      "properties": {
        "alertsCount": 1942,
        "smartGroupState": "New",
        "severity": "Sev3",
        "startDateTime": "2018-06-06T12:35:09Z",
        "lastModifiedDateTime": "2018-06-13T06:30:09Z",
        "lastModifiedUserName": "System",
        "resources": [
          {
            "name": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int",
            "count": 1942
          }
        ],
        "resourceTypes": [
          {
            "name": "components",
            "count": 1942
          }
        ],
        "resourceGroups": [
          {
            "name": "alertscorrelationrg",
            "count": 1942
          }
        ],
        "monitorServices": [
          {
            "name": "Application Insights",
            "count": 1942
          }
        ],
        "monitorConditions": [
          {
            "name": "Fired",
            "count": 1942
          }
        ],
        "alertStates": [
          {
            "name": "New",
            "count": 1941
          },
          {
            "name": "Acknowledged",
            "count": 1
          }
        ],
        "alertSeverities": [
          {
            "name": "Sev3",
            "count": 1942
          }
        ]
      },
      "id": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059",
      "type": "Microsoft.AlertsManagement/smartGroups",
      "name": "cpu alert"
    },
    {
      "properties": {
        "alertsCount": 15374,
        "smartGroupState": "Acknowledged",
        "severity": "Sev0",
        "startDateTime": "2018-05-17T10:18:44.2020997Z",
        "lastModifiedDateTime": "2018-06-13T06:29:01Z",
        "lastModifiedUserName": "System",
        "resources": [
          {
            "name": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/alertsint",
            "count": 15374
          }
        ],
        "resourceTypes": [
          {
            "name": "microsoft.operationalinsights/workspaces",
            "count": 6912
          },
          {
            "name": "workspaces",
            "count": 8462
          }
        ],
        "resourceGroups": [
          {
            "name": "mms-eus",
            "count": 15374
          }
        ],
        "monitorServices": [
          {
            "name": "Log Analytics",
            "count": 13911
          }
        ],
        "monitorConditions": [
          {
            "name": "Fired",
            "count": 15374
          }
        ],
        "alertStates": [
          {
            "name": "New",
            "count": 15358
          },
          {
            "name": "Acknowledged",
            "count": 12
          },
          {
            "name": "Closed",
            "count": 4
          }
        ],
        "alertSeverities": [
          {
            "name": "Sev0",
            "count": 6984
          },
          {
            "name": "Sev1",
            "count": 6927
          }
        ]
      },
      "id": "/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/01114c7c-769f-4fd4-b6fa-ab77693b83cd",
      "type": "Microsoft.AlertsManagement/smartGroups",
      "name": "CPU Alert"
    }
  ]
}

Definitions

Name Description
AlertState

Filter by state of the smart group. Default value is to select all.

api-version

client API version

errorResponse

An error response from the service.

errorResponseBody

Details of error response.

MonitorCondition

Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.

MonitorService

Filter by monitor service which generates the alert instance. Default value is select all.

Severity

Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group.

smartGroup

Set of related alerts grouped together smartly by AMS.

smartGroupAggregatedProperty

Aggregated property of each type

smartGroupsList

List the alerts.

SmartGroupsSortByFields

Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'.

SortOrder

Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.

State

Smart group state

TimeRange

Filter by time range by below listed values. Default value is 1 day.

AlertState

Filter by state of the smart group. Default value is to select all.

Name Type Description
Acknowledged

string

Closed

string

New

string

api-version

client API version

Name Type Description
2019-05-05-preview

string

errorResponse

An error response from the service.

Name Type Description
error

errorResponseBody

Details of error response.

errorResponseBody

Details of error response.

Name Type Description
code

string

Error code, intended to be consumed programmatically.

details

errorResponseBody[]

A list of additional details about the error.

message

string

Description of the error, intended for display in user interface.

target

string

Target of the particular error, for example name of the property.

MonitorCondition

Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.

Name Type Description
Fired

string

Resolved

string

MonitorService

Filter by monitor service which generates the alert instance. Default value is select all.

Name Type Description
ActivityLog Administrative

string

ActivityLog Autoscale

string

ActivityLog Policy

string

ActivityLog Recommendation

string

ActivityLog Security

string

Application Insights

string

Log Analytics

string

Nagios

string

Platform

string

SCOM

string

ServiceHealth

string

SmartDetector

string

VM Insights

string

Zabbix

string

Severity

Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group.

Name Type Description
Sev0

string

Sev1

string

Sev2

string

Sev3

string

Sev4

string

smartGroup

Set of related alerts grouped together smartly by AMS.

Name Type Description
id

string

Azure resource Id

name

string

Azure resource name

properties.alertSeverities

smartGroupAggregatedProperty[]

Summary of alertSeverities in the smart group

properties.alertStates

smartGroupAggregatedProperty[]

Summary of alertStates in the smart group

properties.alertsCount

integer

Total number of alerts in smart group

properties.lastModifiedDateTime

string

Last updated time of smart group. Date-Time in ISO-8601 format.

properties.lastModifiedUserName

string

Last modified by user name.

properties.monitorConditions

smartGroupAggregatedProperty[]

Summary of monitorConditions in the smart group

properties.monitorServices

smartGroupAggregatedProperty[]

Summary of monitorServices in the smart group

properties.nextLink

string

The URI to fetch the next page of alerts. Call ListNext() with this URI to fetch the next page alerts.

properties.resourceGroups

smartGroupAggregatedProperty[]

Summary of target resource groups in the smart group

properties.resourceTypes

smartGroupAggregatedProperty[]

Summary of target resource types in the smart group

properties.resources

smartGroupAggregatedProperty[]

Summary of target resources in the smart group

properties.severity

Severity

Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group.

properties.smartGroupState

State

Smart group state

properties.startDateTime

string

Creation time of smart group. Date-Time in ISO-8601 format.

type

string

Azure resource type

smartGroupAggregatedProperty

Aggregated property of each type

Name Type Description
count

integer

Total number of items of type.

name

string

Name of the type.

smartGroupsList

List the alerts.

Name Type Description
nextLink

string

URL to fetch the next set of alerts.

value

smartGroup[]

List of alerts

SmartGroupsSortByFields

Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'.

Name Type Description
alertsCount

string

lastModifiedDateTime

string

severity

string

startDateTime

string

state

string

SortOrder

Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.

Name Type Description
asc

string

desc

string

State

Smart group state

Name Type Description
Acknowledged

string

Closed

string

New

string

TimeRange

Filter by time range by below listed values. Default value is 1 day.

Name Type Description
1d

string

1h

string

30d

string

7d

string