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.

Linux

banshee/linux-collection/linux/snmp/

load

Load average of a Linux host by SNMP over 1, 5 and 15 minutes, raw and per processor.

  • linux
  • snmp
  • load
  • net-snmp

by banshee1 installation2 versions

v2Latest

Published on October 28, 2026. One naming convention across collections; documentation completed.

Keen 1.0.0 · 35 lines
// The load average of a Linux host, by SNMP (net-snmp): over 1, 5 and 15 minutes, from laLoadInt
// (UCD-SNMP-MIB), which the agent serves multiplied by 100; and each one divided by the number of logical
// processors, which hrProcessorTable (HOST-RESOURCES-MIB) counts. Per processor, a load of 1 means that
// each one has, on average, one task running, waiting for its turn or waiting for disks.
need('protocol:snmp');

output('load-1', 'number', array('label' => 'Load, 1 minute'));
output('load-5', 'number', array('label' => 'Load, 5 minutes'));
output('load-15', 'number', array('label' => 'Load, 15 minutes'));
output('load-1-per-core', 'number', array('label' => 'Load per processor, 1 minute'));
output('load-5-per-core', 'number', array('label' => 'Load per processor, 5 minutes'));
output('load-15-per-core', 'number', array('label' => 'Load per processor, 15 minutes'));
output('cores', 'number', array('label' => 'Number of processors'));

watch.above('load-high', 'High load', 'load-5-per-core', array('warning' => 1.5, 'critical' => 3));
watch.above('load-sustained', 'Sustained load', 'load-15-per-core', array('warning' => 1, 'enabled' => false));

// laLoadInt, by laIndex: 1, 5 and 15 minutes.
$load1 = snmp.get('1.3.6.1.4.1.2021.10.1.5.1') / 100;
$load5 = snmp.get('1.3.6.1.4.1.2021.10.1.5.2') / 100;
$load15 = snmp.get('1.3.6.1.4.1.2021.10.1.5.3') / 100;

// hrProcessorLoad, one row per logical processor: only their number matters here.
$cores = list.count(snmp.walk('1.3.6.1.2.1.25.3.3.1.2'));
if ($cores == 0) {
    fail('misconfigured', 'The agent does not serve the processor table (hrProcessorTable)');
}

value('load-1', number.round($load1, 2));
value('load-5', number.round($load5, 2));
value('load-15', number.round($load15, 2));
value('load-1-per-core', number.round($load1 / $cores, 2));
value('load-5-per-core', number.round($load5 / $cores, 2));
value('load-15-per-core', number.round($load15 / $cores, 2));
value('cores', $cores);