Skip to content

Commit 82d88ea

Browse files
committed
log-analytics alert api typos
1 parent a61a207 commit 82d88ea

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

articles/log-analytics/log-analytics-api-alerts.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
title: Log Analytics Alert REST API
33
description: The Log Analytics Alert REST API allows you to create and manage alerts in Operations Management Suite (OMS). This article provides details of the API and several examples for performing different operations.
44
services: log-analytics
@@ -13,7 +13,7 @@ ms.devlang: na
1313
ms.topic: article
1414
ms.tgt_pltfrm: na
1515
ms.workload: infrastructure-services
16-
ms.date: 10/18/2016
16+
ms.date: 11/18/2016
1717
ms.author: bwren
1818

1919
---
@@ -59,13 +59,13 @@ Following is a sample response for a schedule.
5959
### Creating a schedule
6060
Use the Put method with a unique schedule ID to create a new schedule. Note that two schedules cannot have the same ID even if they are associated with different saved searches. When you create a schedule in the OMS console, a GUID is created for the schedule ID.
6161

62-
$scheduleJson = "{'properties': { 'Interval': 15, 'QueryTimeSpan':15, 'Active':'true' }"
62+
$scheduleJson = "{'properties': { 'Interval': 15, 'QueryTimeSpan':15, 'Active':'true' } }"
6363
armclient put /subscriptions/{Subscription ID}/resourceGroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/{Workspace Name}/savedSearches/{Search ID}/schedules/mynewschedule?api-version=2015-03-20 $scheduleJson
6464

6565
### Editing a schedule
6666
Use the Put method with an existing schedule ID for the same saved search to modify that schedule. The body of the request must include the etag of the schedule.
6767

68-
$scheduleJson = "{'etag': 'W/\"datetime'2016-02-25T20%3A54%3A49.8074679Z'\""','properties': { 'Interval': 15, 'QueryTimeSpan':15, 'Active':'true' }"
68+
$scheduleJson = "{'etag': 'W/\"datetime'2016-02-25T20%3A54%3A49.8074679Z'\""','properties': { 'Interval': 15, 'QueryTimeSpan':15, 'Active':'true' } }"
6969
armclient put /subscriptions/{Subscription ID}/resourceGroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/{Workspace Name}/savedSearches/{Search ID}/schedules/mynewschedule?api-version=2015-03-20 $scheduleJson
7070

7171

@@ -184,12 +184,12 @@ Following is a sample response for an email notification action with a threshold
184184
Use the Put method with a unique action ID to create a new e-mail action for a schedule. The following example creates an email notification with a threshold so the mail is sent when the results of the saved search exceed the threshold.
185185

186186
$emailJson = "{'properties': { 'Name': 'MyEmailAction', 'Version':'1', 'Type':'Alert', 'Threshold': { 'Operator': 'gt', 'Value': 10 }, 'EmailNotification': {'Recipients': ['[email protected]', '[email protected]'], 'Subject':'This is the subject', 'Attachment':'None'} }"
187-
armclient put /subscriptions/{Subscription ID}/resourceGroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/{Workspace Name}/savedSearches/{Search ID}/schedules/{Schedule ID}/actions/myemailaction?api-version=2015-03-20 $ emailJson
187+
armclient put /subscriptions/{Subscription ID}/resourceGroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/{Workspace Name}/savedSearches/{Search ID}/schedules/{Schedule ID}/actions/myemailaction?api-version=2015-03-20 $emailJson
188188

189189
Use the Put method with an existing action ID to modify an e-mail action for a schedule. The body of the request must include the etag of the action.
190190

191191
$emailJson = "{'etag': 'W/\"datetime'2016-02-25T20%3A54%3A20.1302566Z'\"','properties': { 'Name': 'MyEmailAction', 'Version':'1', 'Type':'Alert', 'Threshold': { 'Operator': 'gt', 'Value': 10 }, 'EmailNotification': {'Recipients': ['[email protected]', '[email protected]'], 'Subject':'This is the subject', 'Attachment':'None'} }"
192-
armclient put /subscriptions/{Subscription ID}/resourceGroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/{Workspace Name}/savedSearches/{Search ID}/schedules/{Schedule ID}/actions/myemailaction?api-version=2015-03-20 $ emailJson
192+
armclient put /subscriptions/{Subscription ID}/resourceGroups/OI-Default-East-US/providers/Microsoft.OperationalInsights/workspaces/{Workspace Name}/savedSearches/{Search ID}/schedules/{Schedule ID}/actions/myemailaction?api-version=2015-03-20 $emailJson
193193

194194
#### Remediation actions
195195
Remediations start a runbook in Azure Automation that attempts to correct the problem identified by the alert. You must create a webhook for the runbook used in a remediation action and then specify the URI in the WebhookUri property. When you create this action using the OMS console, a new webhook is automatically created for the runbook.

0 commit comments

Comments
 (0)