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/

below

Example: the watch below; the memory a Linux has available, by SSH.

  • example
  • watch
  • below
  • memory
  • ssh

by banshee1 installation1 version

v1Latest

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

Keen 1.0.0 · 12 lines
// The watch "below": it raises when a value is strictly below a threshold.
// The collector reads the memory a Linux still has available, by SSH.
need('protocol:ssh');

output('available', 'number', array('label' => 'Memory available', 'unit' => 'MiB'));

watch.below('low-memory', 'Little memory left', 'available', array('warning' => 512, 'critical' => 128));

// "MemAvailable:  3041672 kB": the second word, in kB.
$read = ssh.run("grep '^MemAvailable:' /proc/meminfo");
$f = text.words($read['output']);
value('available', number.round($f[1] / 1024));