module ServerMetrics

The base class for SystemMetrics collectors.

Some collects inherit directly from Collector, and some inherit from MultiCollector. The difference: if you're collecting for an arbitrary number of instances (say, disks), use MultiCollector. Otherwise, use Collector.

Relative to Scout's plugins, Collectors have a few differences:

  1. simplified: no options parsing. simpler interface to reporting and memory (these methods only take a hash)

  2. intended to persist in memory: a collector maintains its own memory. Reuse the same instance as many times as needed. If you need to persist to disk, use the to_hash and from_hash methods.

MultiCollector is a special case of Collector that returns N metric bundles. For example, Disk uses MultiCollector:
you can have any number of mounted disks. MultiCollector generates a nested result:

{

"dev/disk1" => {
    "Avail" => 295936.0,
    "Capacity" => 38.0,
    ...
},
"dev/disk2" => {
    "Avail" => 295936.0,
    "Capacity" => 38.0,
     ...
}

}

Constants

VERSION