Microsoft Operations Management Suite Cookbook
上QQ阅读APP看书,第一时间看更新

Creating an alert rule

Perform the following steps:

  1. Navigate to the Azure portal at http://portal.azure.com and sign in.
  2. In the Azure portal, type Log Analytics in the search field and select your workspace.
  1. In the Log Analytics blade for your workspace, click the Log Search button to take you to the search field:
Figure 3.1
  1. In the Log Search editor, conduct a search by typing in this table-based query and clicking the search icon:
Perf
| where ( ObjectName == "Memory”)
| where (CounterName == "Available MBytes”) and CounterValue<=1024
|summarize avg (CounterValue) by Computer
Figure 3.2
  1. After the results have been displayed in the results field, click the alert button at the top of the Log Search page to open the alert rule page:
Figure 3.3
  1. In the Add Alert Rule page, enter a rule name in the Name field, such as Available Mbytes of Memory <= 1024, and optionally, fill in the Description field.
  2. Click the drop-down under the Severity to select an alert severity, review the query in the Search query field, and enter a time range in the Time window field.
  3. In the Schedule section of the alert rule page, enter a time frequency in the Alert frequency field to indicate how often the query should be run.
You can specify a time range and alert frequency of between 5 minutes and 24 hours in both the Time window and Alert frequency fields.
  1. Next, select the Number of results field and Greater than 0 in the Number of results field. Then click on Save.