- Microsoft Operations Management Suite Cookbook
- Chiyo Odika
- 271字
- 2021-08-27 20:22:13
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=1739617221-cbAirKOSu1PfM7qihJyebnM0mj1IrRfO-0-5c757c9fbaaffc1b81dc5662a9f8526a)
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=1739617221-sudEtTLNBzwVtECAH17YVuoK3h8RaFQb-0-fdd1adb43afeedf7d9e07fd131c872a1)
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=1739617221-S3PC1vOSIkn8OgYDIdoEQyGhufBJen1c-0-174c467e233f094893aee199e06453a9)
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=1739617221-seXk9uWSHhxDVjA6rzo9ejMPEnjKEuCj-0-506c5ddaf5c13fa0eeea880812ebf79a)
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=1739617221-byZw9763MLd1kJTffujmZc6OHnavlYvj-0-1c0a779c15d42721444f1ca50c545ff7)
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=1739617221-NueU7auHXhecl4qZf0A3UHl3agKnCQWe-0-531e0092f682b1aaf18d9bba79da81ae)
Figure 2.19