cockpit.js: Metrics — Reading and streaming metric data
Metrics about the system can be retrieved from several sources using
cockpit.metrics() metrics channels.
The metrics are made available as series data, and can be used with the
metrics = cockpit.metrics(interval, options, cache)
interval is in milliseconds, and is the granularity of the series data
retrieved. Any grids consuming the data must have the same interval.
cache argument is a cache identifier. If
specified, then this metrics channel will share data with other
metrics channels of the same identifier. Make sure to use a
globally unique string.
plain object, or an array of those. Each object can have the
The source to use for real-time data. This
is used by the
The source to use for retrieving historical
data. This is used by the
options argument is an array of
order until one succeeds. This way, you can prefer PCP as the
source but fall back to internal metrics when PCP is not
available, for example. The channel gives no indication which
of the options has been used, and
follow might use different entries from the
Retrieve archived metrics data between
arguments can either be numbers, in which case they are interval based offsets, or they