Forum Discussion
Rt2472095
Nov 28, 2022Copper Contributor
Automated provisioning of log search alerts
Hi,
I am looking into automating the provisioning of alerts used in my application with the Azure python SDK or Monitor REST API.
I have been sucessful in doing this with the Metrics signal type (https://learn.microsoft.com/en-us/python/api/azure-mgmt-monitor/azure.mgmt.monitor.v2018_03_01.operations.metricalertsoperations?view=azure-python) but cannot find a way to do it with the log search signal type.
Is there a way to automate the provisioning of log search signal types with python or a REST API call?
Kind Regards,
Athi Dharma
- PhilipVandeVyverBrass Contributor
Scheduled Query Rules can be created using a REST API call:
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}?api-version=2021-08-01
Take a look at the Scheduled Query Rules documentation for more information.