Welcome to docs.opsview.com


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

Example GET
Request URL /rest/graph
    list => [
            data => [
                [ 1242849600, 517 ],    // Time in Unix epoch seconds and value at this time
                [ 1242936000, 517 ],    // Note: The value could be null/empty string to mean "no value at this time" - this should be represented as a gap in any graphs
                [ 1254168000, 505 ],
            description =>
              "Min: 505.000<br />Max: 517.000<br />Average: 511.305",
            label => "opsview::Opsview HTTP::size",
            uom   => "bytes",
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”. Default: 1d. 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_offset_timezone 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.

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