Microsoft Operations Management Suite Cookbook
上QQ阅读APP看书,第一时间看更新

Working with time charts

Azure Log Analytics also provides time-charting capabilities. With time charts you can show the average fiftieth and ninety-fifth percentiles of a performance counter over a period of time. Consider the need to show the average fiftieth and ninety-fifth percentiles of the bytes total/sec performance counter in bins of 1 hour. To do this, go through the following method:

  1. In the new query field in the Analytics portal, type the following query into the search field:
Perf 
| where TimeGenerated > ago(1d)  
| where CounterName == "Bytes Total/sec"  
| summarize avg(CounterValue), percentiles(CounterValue, 50,  
95)  by bin(TimeGenerated, 1h) 
  1. Click the Go button  in the upper right-hand corner of your screen to return a distribution of your data over the last day. By default, the results are displayed in a table.
  2. In the result pane, click Chart to render a multidimensional depiction of the data with various value combinations. Click Stacked Column and select Line to display a line chart:
Figure 2.23

With time charts in Azure Log Analytics, you can incorporate thresholds into charts using reference lines to easily identify and visualize when a metric exceeds a specific threshold of interest. To do this, use the extend tabular operator to create and initialize a calculated column and append it as a threshold value to the result set. To do this, go through the following steps:

  1. Modify the query expression in the search field to extend the result set with a constant column that serves as a threshold:
Perf
| where TimeGenerated > ago(1d)
| where CounterName == "Bytes Total/sec"
| summarize avg(CounterValue), percentiles(CounterValue, 50,
95) by bin(TimeGenerated, 1h)
| extend Threshold = 100000
  1. Click the Go button in the upper right-hand corner of your screen to return a distribution of your data over the last day. By default, the results are displayed in a table:
Figure 2.24
  1. In the results pane, click Chart to render a multidimensional depiction of the data with various value combinations. Click Stacked Column and select Line to display a line chart with a visible threshold line:
Figure 2.25