Using Console
Using CLI
<DIAGNOSTIC-SETTING-NAME>
, <RESOURCE-ID>
, and <RESOURCE-TYPE>
with the appropriate values.
For example, if you want to enable AuditEvent logging for a virtual machine, the command would be:
Using Python
<client-id>
, <client-secret>
, and <tenant-id>
with the corresponding values for your Azure account.MonitorManagementClient
:<subscription-id>
with the ID of the subscription you want to remediate.<resource-group-name>
with the name of the resource group containing the alert, <alert-name>
with the name of the alert, <location>
with the location of the alert, <tag-key>
and <tag-value>
with the key and value of any tags you want to add to the alert, and <action-group-id>
with the ID of the action group you want to associate with the alert.<resource-group-name>
and <alert-name>
with the corresponding values for your alert.If the output is True
, then AuditEvent logging is enabled.