![Microsoft Operations Management Suite Cookbook](https://wfqqreader-1252317822.image.myqcloud.com/cover/3/36700003/b_36700003.jpg)
上QQ阅读APP看书,第一时间看更新
Creating an alert rule
Perform the following steps:
- Navigate to the Azure portal at http://portal.azure.com and sign in.
- In the Azure portal, type Log Analytics in the search field and select your workspace.
- In the Log Analytics blade for your workspace, click the Log Search button to take you to the search field:
![](https://epubservercos.yuewen.com/02BCAB/19470394901574106/epubprivate/OEBPS/Images/82675713-59f6-443f-8292-de24bf8007ac.png?sign=1738751944-tvXC4zv1F0ahdiEySEOAuOmGSRB1IeI8-0-02d700ac1842404cc101f12a3ccca0a5)
Figure 3.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
![](https://epubservercos.yuewen.com/02BCAB/19470394901574106/epubprivate/OEBPS/Images/d44cf18d-effc-4a86-a3b5-d69a33911edd.png?sign=1738751944-GZOajAT0Gq9YmdygSj1xua8Jq3jQ7iU7-0-7d3510499f6e546c57418bc1e4315484)
Figure 3.2
- 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:
![](https://epubservercos.yuewen.com/02BCAB/19470394901574106/epubprivate/OEBPS/Images/cd415655-b53a-4b68-b5ee-149807490e0a.png?sign=1738751944-VvZBVNEGC9md4LcPoEr6ksJjDGNQ8uBU-0-70ec6c646b8f2b304728f3490351f02c)
Figure 3.3
- 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.
- 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.
- 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.
- Next, select the Number of results field and Greater than 0 in the Number of results field. Then click on Save.