Welcome to docs.opsview.com

REST API: Graph

This will be available from Opsview 3.13.1.

URL: /rest/graph. This requires authentication. Requires VIEWALL or VIEWSOME permission

  • GET - returns performance data for requested objects
  • POST, PUT, DELETE - not implemented

Access Control

VIEWALL allows all performance data to be returned.

VIEWSOME allows performance data to be returned for objects where permission has been granted for the service based on the access object selection.

Requesting Performance Data

Parameters:

  • end - expected as number of epoch seconds. Defaults to now.
  • start - epoch seconds. Defaults to end subtract 1 day duration. This has priority over duration
  • duration - specify duration. Use expected abbreviations for hours, days, weeks, months. Use months and minutes instead of m. See the RRDtool documentation for more information. Examples:
    • 3145h - 3145 hours
    • 131d1h - 131 days and 1 hour
    • 18w5d1h - 18 weeks, 5 days and 1 hour
  • hsm - in the format of hostname::servicename::metricname. Can be repeated. If the performance metric is not found, it is ignored from the response
  • include_timezone_offset. Defaults to 0. Set this to 1 to adjust the time value so that the current timezone offset from UTC (based on the Opsview server) is included in the time value. This is not required in most cases.

Example response:

{
  list => [
    {
      data => [
        [1242849600, 517],
        [1242936000, 517],
        ....
        [1254168000, 505],
      ],
      description => "Min: 505.000<br />Max: 517.000<br />Average: 511.305",
      label => "opsview::Opsview HTTP::size",
      uom => "bytes",
    }
  ],
}     

The time parameter is the number of seconds since epoch. This time is returned back in UTC format. See the include_timezone_offset parameter if you want the this value adjusted based on the timezone. Note, it is not possible to return this value as a date time formatted string.

Navigation
Print/export
Toolbox