Examples
banshee/examples-collection/examples/protocols/
snmp-walk
Example: snmp.walk, a whole branch; the number of programs running on a device.
by banshee1 installation1 version
Published on October 27, 2026. First version in this collection.
// snmp.walk: read a whole branch at once. It returns array(suffix => value); an empty branch is an
// empty array, not a failure.
// The collector counts the programs running on a device.
need('protocol:snmp');
output('programs', 'number', array('label' => 'Programs running'));
watch.above('too-many', 'Too many programs', 'programs', array('warning' => 500));
// hrSWRunName (HOST-RESOURCES-MIB): one entry per running program, its suffix the index of the program.
$names = snmp.walk('1.3.6.1.2.1.25.4.2.1.2');
value('programs', list.count($names));