![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=1739379037-AnLKuUPtkpguADJWxhf9eD1jTSkxGgmP-0-2ea2f5636da40891b78a623ccf5dd906)
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=1739379037-Olpq3br5CX67a1QkEju3Qvk4TiMvatK5-0-082e72bc5547d1326974043b0b438dcc)
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=1739379037-Qc4WHYn5SfGkEdGqVxghTNdDjKQvmPoy-0-624f6ff62a2c6235feac903de0be1bb0)
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=1739379037-77NlxM5ASTn8YiKVocMDrZBpQi4AaRVq-0-d9c18e9b079e3b50f56785a5b2a98850)
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=1739379037-hgedUXBTHbAT40OyPW61RJ5f3xkLUKhD-0-4010c1504d38465ee3ba39fbc240c65f)
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=1739379037-x6xxSHz1MC4cQe4q9JxbdrxF2UttIzfC-0-69790175a0879fcf1bd77332840c5675)
Figure 2.19