
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:
- 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)
- 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.
- 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:

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

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