API for Graphs

Observium provides a HTTP GET-based API to facilitate generation of graphs from RRDs.

Authentication

Currently the API supports HTTP basic authentication to an existing Observium user. This allows the API to be authenticated against any existing authentication system including LDAP, RADIUS and Observium's own MySQL authentication database.

Authentication is simple, for example:

curl -u <username>:<password> http://observium.domain.com/graph.php?<ARGUMENTS>

Basic Operation

The Graph API is accessed via the graph.php script, using GET variables to pass arguments. At a minimum you need to provide type, from, to, height and width. Many graph types also require one or more id values, for example the id of a port. Device graphs accept device.

The graph type is normally composed of the entity type and graph type specific to that entity, for example port_bits is the bits graph type for the ports entity type. Multi-entity graph types expect a list of comma-separated entity ids as the id parameter.

Datetime format

The format used for from and to arguments can be specified either as UNIXTIME in seconds or using AT-style syntax.

Parameters

Option Description
type The graph type. port_bits device_bits storage_usage
from The graph start time
to The graph end time