![Microsoft Operations Management Suite Cookbook](https://wfqqreader-1252317822.image.myqcloud.com/cover/3/36700003/b_36700003.jpg)
上QQ阅读APP看书,第一时间看更新
How to do it...
Perform the following steps:
- Navigate to the Azure portal (http://portal.azure.com) and sign in.
- In the Azure portal, type Log Analytics in the Search resources 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.
- In the Log Search page, click on the Advanced Analytics link under the search box to take you to the Analytics portal:
![](https://epubservercos.yuewen.com/02BCAB/19470394901574106/epubprivate/OEBPS/Images/0a97336b-e1aa-4ebb-bf66-8e6db4636372.png?sign=1738897218-7MD4pvYn2KwwCWD7AzFTaCYOG63694eG-0-71b81f80cacce1620b4a1e827aa00b9e)
Figure 2.14
- In the Analytics portal, click on the + button to open a new query tab:
![](https://epubservercos.yuewen.com/02BCAB/19470394901574106/epubprivate/OEBPS/Images/458da083-0e0e-4ec4-8fe0-41ba2042aff5.png?sign=1738897218-EU6f6eoEaknPloYvyYpQJTIq3zfaHn7K-0-e77da8be838208d54922dd73f1c7abb6)
Figure 2.15
- In the new query field, type the following query into the search field:
union withsource=type *
| where TimeGenerated > ago(48h)
| summarize AggregatedValue = count() by type
- Click the Go button in the upper right hand corner of your screen to return a distribution of your data over the last 48 hours. By default, the results are displayed in a table:
![](https://epubservercos.yuewen.com/02BCAB/19470394901574106/epubprivate/OEBPS/Images/d1b1b27d-d1e1-4e09-b730-654d3b32732d.png?sign=1738897218-ZS6I50cIigtu0QRcwjhmrntVHNDNIA1R-0-aa732930a3caa2062c0e19e081354b56)
Figure 2.16
- Click CHART to chart the result, and to see the results in a stacked bar chart view:
![](https://epubservercos.yuewen.com/02BCAB/19470394901574106/epubprivate/OEBPS/Images/e1075a99-beec-491d-9201-c837d89f17fb.png?sign=1738897218-MeM6IL7SQcr2UEvyIz4y6wzMGNFIO6Yg-0-58f65e356df6196aeb8b7e5a737ac882)
Figure 2.17
- Click Stacked Column and select Doughnut to show another view of the results:
![](https://epubservercos.yuewen.com/02BCAB/19470394901574106/epubprivate/OEBPS/Images/5fce638e-00f8-410e-a94d-aef8ea3eb6ac.png?sign=1738897218-RWBXOSAvsLeloTAEHhBe1UHlWhYhamne-0-5fa2f8aedfa3782b5b54af855e3447c1)
Figure 2.18
- Return to the search field in the same page and add a new line with the render tabular operator to render the data as a pie chart:
union withsource=type *
| where TimeGenerated > ago(48h)
| summarize AggregatedValue = count() by type
| render piechart
- Click the Go button
in the upper right hand corner of your screen to return a distribution of your data over the last 48 hours, rendered as a pie chart:
![](https://epubservercos.yuewen.com/02BCAB/19470394901574106/epubprivate/OEBPS/Images/77162835-7d01-49e6-a9e8-13463e16acba.png?sign=1738897218-cR0HX1P5BolnYrou04UjgBN7ANDSyPA4-0-c0d11237e52e6468cc7dd3ca6cbf862c)
Figure 2.19