![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=1739306071-nQ1pjVIMa4A07Vs5j5wmhN21SBL9c8Et-0-452d3be2017df517384502f2e894daa3)
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=1739306071-zOuRQPWOpBEjTFeJHILtq4Ybb7rNBaVN-0-af0840d24a71d96b7abde2b1dcb82376)
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=1739306071-VzgNjBEPyWMJMZ6ERjEDxbPESfemnh2H-0-2473309b427327b16173efedd7cc20ae)
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=1739306071-Wu2fJnBoet6oJUtA6q67FB82YOjP0MQz-0-b9e24d459595079920b09201a95739be)
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=1739306071-yXQ4pBRtAK1OjHxs8viDEn3DRjcrQlKv-0-a3c365b3146c519173e760b2c2ea2202)
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=1739306071-WaQveuo4UN4ytutfrRR9iv1KjSvtaYH7-0-b2059fb1d554579dd096748973bf2e2e)
Figure 2.19