Examples
banshee/examples-collection/examples/basics/
first-collector
Example: the smallest collector, one SSH command, one value, one watch.
par banshee1 installation1 version
Publiée le 27 octobre 2026. First version in this collection.
A first collector
The smallest useful collector: one access, one value, one watch. Read it first.
How to read it
- The header, the first lines:
need('protocol:ssh')asks for the SSH access of the host, set in the tree;output('users', 'number', …)declares the value returned;watch.above(…)proposes a watch, with its default thresholds. The master reads the header without running the code. - The body, after the header:
ssh.runruns the command on the host and returnsoutput,errorsandexit;value('users', …)returns the value declared under that name. text.trimtakes the line break off the end of what the command printed.- No threshold is written in the body: the poller judges the value by the watch, with the thresholds the administrator keeps or changes on the probe.
To adapt it
- Change the command, the name of the output and its label: any command that prints one number fits.
- Change the default thresholds of the watch, or its kind (
watch.below,watch.state…): see the examples underexamples/watches.