Azure Resource Graph-Beispielabfragen für Azure Service Health

Diese Seite zeigt eine Sammlung von Azure Resource Graph-Beispielabfragen für Azure Service Health.

Hinweis

Nach jeder Abfrage sollten die aktualisierten Ergebnisse innerhalb von 5 Minuten im Allgemeinen angezeigt werden.

Überblick

Auf dieser Seite können Sie die Integrität Ihrer Azure-Dienste und -Ressourcen mithilfe von Kusto Query Language (KQL) über Azure Resource Graph überwachen und verstehen.

Sie enthält Beispielabfragen speziell für Azure Service Health.

Service Health-Beispielabfragen

Active Service Health-Ereignisse nach Abonnement

Diese Abfrage zeigt alle aktiven Dienststatusereignisse wie Dienstprobleme, geplante Wartung, Integritätsratgeber und Sicherheitsempfehlungen an, gruppiert nach Ereignistyp und enthält eine Anzahl der betroffenen Dienste.

Ein Beispiel zeigt jeden Ereignistyp und eine Anzahl, die zeigt, wie viele Abonnements davon betroffen sind.

Hinweis

Neue Probleme sind nicht an Abonnement-IDs gebunden und können daher nicht über ARG abgefragt werden, was auf Abonnement-ID basiert. Weitere Informationen finden Sie unter Resource Health emerging issues.

ServiceHealthResources
| where type =~ 'Microsoft.ResourceHealth/events'
| extend eventType = tostring(properties.EventType), status = properties.Status, description = properties.Title, trackingId = properties.TrackingId, summary = properties.Summary, priority = properties.Priority, impactStartTime = properties.ImpactStartTime, impactMitigationTime = properties.ImpactMitigationTime
| where eventType == 'ServiceIssue' and status == 'Active'
| summarize count(subscriptionId) by name
az graph query -q "ServiceHealthResources | where type =~ 'Microsoft.ResourceHealth/events' | extend eventType = tostring(properties.EventType), status = properties.Status, description = properties.Title, trackingId = properties.TrackingId, summary = properties.Summary, priority = properties.Priority, impactStartTime = properties.ImpactStartTime, impactMitigationTime = properties.ImpactMitigationTime | where eventType == 'ServiceIssue' and status == 'Active' | summarize count(subscriptionId) by name"

Alle aktiven Ereignisse zur Integritätsempfehlung

Diese Abfrage listet alle aktiven Gesundheitsempfehlungsereignisse von Service Health in allen Abonnements auf, auf die Sie Zugriff haben.

Hinweis

Bei Gesundheitswarnungen zeigt Mitigation Time lediglich die Endzeit der Warnung an. Sicherheitshinweise verfügen nicht über eine separate Zeit zur Risikominderung, daher ist dieses Feld nicht zutreffend. Weitere Informationen finden Sie unter Events-List nach Abonnement-ID.

Alle bevorstehenden Dienstaktivierungsereignisse sind Teil aller aktiven Integritätsempfehlungsereignisse.

ServiceHealthResources
| where type =~ 'Microsoft.ResourceHealth/events'
| extend eventType = properties.EventType, status = properties.Status, description = properties.Title, trackingId = properties.TrackingId, summary = properties.Summary, priority = properties.Priority, impactStartTime = properties.ImpactStartTime, impactMitigationTime = todatetime(tolong(properties.ImpactMitigationTime))
| where eventType == 'HealthAdvisory' and impactMitigationTime > now()
az graph query -q "ServiceHealthResources | where type =~ 'Microsoft.ResourceHealth/events' | extend eventType = properties.EventType, status = properties.Status, description = properties.Title, trackingId = properties.TrackingId, summary = properties.Summary, priority = properties.Priority, impactStartTime = properties.ImpactStartTime, impactMitigationTime = todatetime(tolong(properties.ImpactMitigationTime)) | where eventType == 'HealthAdvisory' and impactMitigationTime > now()"

Alle bevorstehenden Dienststilllegungsveranstaltungen

Diese Abfrage gibt alle bevorstehenden Service Health-Ereignisse für Einstellungen für alle Ihre Abonnements zurück.

ServiceHealthResources
| where type =~ 'Microsoft.ResourceHealth/events'
| extend eventType = properties.EventType, eventSubType = properties.EventSubType
| where eventType == "HealthAdvisory" and eventSubType == "Retirement"
| extend status = properties.Status, description = properties.Title, trackingId = properties.TrackingId, summary = properties.Summary, priority = properties.Priority, impactStartTime = todatetime(tolong(properties.ImpactStartTime)), impactMitigationTime = todatetime(tolong(properties.ImpactMitigationTime)), impact = properties.Impact
| where impactMitigationTime > datetime(now)
| project trackingId, subscriptionId, status, eventType, eventSubType, summary, description, priority, impactStartTime, impactMitigationTime, impact

Alle aktiven geplante Wartungsereignisse

Diese Abfrage findet alle aktiven und geplanten Service Health-Wartungsereignisse für alle Abonnements, auf die Sie Zugriff haben, und gibt eine Liste dieser Ereignisse zurück.

ServiceHealthResources
| where type =~ 'Microsoft.ResourceHealth/events'
| extend eventType = properties.EventType, status = properties.Status, description = properties.Title, trackingId = properties.TrackingId, summary = properties.Summary, priority = properties.Priority, impactStartTime = properties.ImpactStartTime, impactMitigationTime = todatetime(tolong(properties.ImpactMitigationTime))
| where eventType == 'PlannedMaintenance' and impactMitigationTime > now()
az graph query -q "ServiceHealthResources | where type =~ 'Microsoft.ResourceHealth/events' | extend eventType = properties.EventType, status = properties.Status, description = properties.Title, trackingId = properties.TrackingId, summary = properties.Summary, priority = properties.Priority, impactStartTime = properties.ImpactStartTime, impactMitigationTime = todatetime(tolong(properties.ImpactMitigationTime)) | where eventType == 'PlannedMaintenance' and impactMitigationTime > now()"

Alle aktiven Service Health Ereignisse

Verwenden Sie diese Abfrage, um alle aktiven Service-Gesundheitsereignisse wie Dienstprobleme, geplante Wartungsarbeiten, Gesundheitshinweise und Sicherheitsempfehlungen in all Ihren Abonnements aufzulisten.

ServiceHealthResources
| where type =~ 'Microsoft.ResourceHealth/events'
| extend eventType = properties.EventType, status = properties.Status, description = properties.Title, trackingId = properties.TrackingId, summary = properties.Summary, priority = properties.Priority, impactStartTime = properties.ImpactStartTime, impactMitigationTime = properties.ImpactMitigationTime
| where (eventType in ('HealthAdvisory', 'SecurityAdvisory', 'PlannedMaintenance') and impactMitigationTime > now()) or (eventType == 'ServiceIssue' and status == 'Active')
az graph query -q "ServiceHealthResources | where type =~ 'Microsoft.ResourceHealth/events' | extend eventType = properties.EventType, status = properties.Status, description = properties.Title, trackingId = properties.TrackingId, summary = properties.Summary, priority = properties.Priority, impactStartTime = properties.ImpactStartTime, impactMitigationTime = properties.ImpactMitigationTime | where (eventType in ('HealthAdvisory', 'SecurityAdvisory', 'PlannedMaintenance') and impactMitigationTime > now()) or (eventType == 'ServiceIssue' and status == 'Active')"

Alle aktiven Dienstproblemereignisse

Diese Abfrage identifiziert und listet alle aktiven Dienstprobleme (Ausfälle) und Gesundheitsereignisse des Dienstes in allen Abonnements auf.

ServiceHealthResources
| where type =~ 'Microsoft.ResourceHealth/events'
| extend eventType = properties.EventType, status = properties.Status, description = properties.Title, trackingId = properties.TrackingId, summary = properties.Summary, priority = properties.Priority, impactStartTime = properties.ImpactStartTime, impactMitigationTime = properties.ImpactMitigationTime
| where eventType == 'ServiceIssue' and status == 'Active'
az graph query -q "ServiceHealthResources | where type =~ 'Microsoft.ResourceHealth/events' | extend eventType = properties.EventType, status = properties.Status, description = properties.Title, trackingId = properties.TrackingId, summary = properties.Summary, priority = properties.Priority, impactStartTime = properties.ImpactStartTime, impactMitigationTime = properties.ImpactMitigationTime | where eventType == 'ServiceIssue' and status == 'Active'"

Nächste Schritte