Hello,
we have some azure VMs, which receive automatic OS updates. These are monitored via simple alert rules like:
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.AUTOMATION" and Category == "JobStreams" and StreamType_s == "Error"
| project TimeGenerated , RunbookName_s , StreamType_s , _ResourceId , ResultDescription , JobId_g
or
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.AUTOMATION" and Category == "JobLogs" and (ResultType == "Failed" or ResultType == "Stopped" or ResultType == "Suspended") and datetime_diff('day',now(),TimeGenerated) <= 1
Now we also want to monitor succesful automatic updates. If possible with some additional informations (like how many updates have been installed).
A query like
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.AUTOMATION" and Category == "JobLogs" and ResultType == "Completed"
only gives me the information, when the job completed.
UpdateRunProgress
| where SubscriptionId == "xxx" and InstallationStatus == 'Succeeded'
gives me good information but also gave me different information for the last succesful run on sunday (there were 3 updates installed, but I get 5 sucessful results with the query).
Is there a better way to get an alert for the update runs?
