banshee is under active development: collectors will keep changing, and a version you publish will likely need adjustments. For stable use, wait for version 1.0.0.

Examples

banshee/examples-collection/examples/watches/

deviate

Example: the watch deviate, one element far from the others; the load of each processor by SNMP.

  • example
  • watch
  • deviate
  • per
  • processor
  • snmp

by banshee1 installation1 version

v1Latest

Published on October 27, 2026. First version in this collection.

Watch: deviate

watch.deviate raises when one element strays from the others of the same pass: here, a processor left idle while the others work, read by SNMP.

How to read it

  • per('processor', 'Processors') declares that the collector returns one value per processor, and 'per' => 'processor' on the output makes it so. deviate needs such an output.
  • The watch compares each processor with the median of the others: 'warning' => 40 raises when it is more than 40 points away from it.
  • 'side' => 'below': only a value under the median counts; above the other way, both (the default) either way.
  • Under three processors kept in a pass, nothing is judged.
  • snmp.walk returns array(suffix => value); foreach ($loads as $index => $load) gives both, and value('load', $load, 'cpu' . $index) names the element.

To adapt it

  • Any set of like elements: the disks of an array, the nodes of a cluster, the links of an aggregate.