Azure Automation Runbook: Test-OMSAlertRemediation

Couple of weeks ago, I published a post titled OMS Alerting Walkthrough. I mentioned in the post that I have written a test runbook called Test-OMSAlertRemediation that extracts information from the OMS alert JSON input sends to you via email. Once you have created this rnbook in your Azure Automation account, you can use it as the remediation runbook for any OMS alerts. Source code: param ([object]$WebHookData) #Process inputs from webhook data Write-Verbose “Processing inputs from webhook data.” $WebhookName    =   $WebhookData.WebhookName Write-Verbose “Webhook name: ‘$WebhookName'” $WebhookHeaders =   $WebhookData.RequestHeader $WebhookBody    =   $WebhookData.RequestBody Write-Verbose “Webhook body:” Write-Verbose $WebhookBody $SearchResults = (ConvertFrom-JSON $WebhookBody).SearchResults

Continue reading
%d bloggers like this: