
上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:

Figure 2.14
- In the Analytics portal, click on the + button to open a new query tab:

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:

Figure 2.16
- Click CHART to chart the result, and to see the results in a stacked bar chart view:

Figure 2.17
- Click Stacked Column and select Doughnut to show another view of the results:

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:

Figure 2.19