다음을 통해 공유


AlertsOperationsExtensions.GetSummaryAsync Method

Definition

Get a summarized count of your alerts grouped by various parameters (e.g. grouping by 'Severity' returns the count of alerts for each severity).

public static System.Threading.Tasks.Task<Microsoft.Azure.Management.AlertsManagement.Models.AlertsSummary> GetSummaryAsync (this Microsoft.Azure.Management.AlertsManagement.IAlertsOperations operations, string groupby, bool? includeSmartGroupsCount = default, string targetResource = default, string targetResourceType = default, string targetResourceGroup = default, string monitorService = default, string monitorCondition = default, string severity = default, string alertState = default, string alertRule = default, string timeRange = default, string customTimeRange = default, System.Threading.CancellationToken cancellationToken = default);
static member GetSummaryAsync : Microsoft.Azure.Management.AlertsManagement.IAlertsOperations * string * Nullable<bool> * string * string * string * string * string * string * string * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Management.AlertsManagement.Models.AlertsSummary>
<Extension()>
Public Function GetSummaryAsync (operations As IAlertsOperations, groupby As String, Optional includeSmartGroupsCount As Nullable(Of Boolean) = Nothing, Optional targetResource As String = Nothing, Optional targetResourceType As String = Nothing, Optional targetResourceGroup As String = Nothing, Optional monitorService As String = Nothing, Optional monitorCondition As String = Nothing, Optional severity As String = Nothing, Optional alertState As String = Nothing, Optional alertRule As String = Nothing, Optional timeRange As String = Nothing, Optional customTimeRange As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of AlertsSummary)

Parameters

operations
IAlertsOperations

The operations group for this extension method.

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. Possible values include: 'severity', 'alertState', 'monitorCondition', 'monitorService', 'signalType', 'alertRule'

includeSmartGroupsCount
Nullable<Boolean>

Include count of the SmartGroups as part of the summary. Default value is 'false'.

targetResource
String

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

targetResourceType
String

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

targetResourceGroup
String

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

monitorService
String

Filter by monitor service which generates the alert instance. Default value is select all. Possible values include: 'Application Insights', 'ActivityLog Administrative', 'ActivityLog Security', 'ActivityLog Recommendation', 'ActivityLog Policy', 'ActivityLog Autoscale', 'Log Analytics', 'Nagios', 'Platform', 'SCOM', 'ServiceHealth', 'SmartDetector', 'VM Insights', 'Zabbix'

monitorCondition
String

Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all. Possible values include: 'Fired', 'Resolved'

severity
String

Filter by severity. Default value is select all. Possible values include: 'Sev0', 'Sev1', 'Sev2', 'Sev3', 'Sev4'

alertState
String

Filter by state of the alert instance. Default value is to select all. Possible values include: 'New', 'Acknowledged', 'Closed'

alertRule
String

Filter by specific alert rule. Default value is to select all.

timeRange
String

Filter by time range by below listed values. Default value is 1 day. Possible values include: '1h', '1d', '7d', '30d'

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.

cancellationToken
CancellationToken

The cancellation token.

Returns

Applies to