Using Offsets

The function offsets(DURATION)will displace the data for the duration specified. Examples of valid offsets values are

  • 1m
  • 3h
  • 1d
  • 1w
The offset function is useful when comparing data and looking for trends on an hourly,daily or weekly basis. The charts being compared can be overlayed on top of each other or placed side by side on a work space.

Let's take a look at the following searches. This search will show the cpu utilisation of the host using a line chart.

cpu | cpu.avg(_host,0h) chart(line) _host.equals(LAB-UK-XS-UB1)

On the search page click on the (+) icon to add a second search. This search will be overlayed the first one.

cpu | cpu.avg(_host,1h) chart(line) _host.equals(LAB-UK-XS-UB1) offset(1h)

The offset term will return results from an hour earlier.

Note that in both searches I labelled the series 0h, and 1h to be able to distinguish them in the results