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.

Hardware

banshee/hardware-collection/hardware/ibm/ssh/hmc/

serviceable-events

The open serviceable events of an IBM HMC, the hardware problems of its servers waiting for service, by SSH.

  • hardware
  • ibm
  • power
  • hmc
  • serviceable-events
  • lssvcevents
  • ssh

by banshee0 installations1 version

v1Latest

Published on October 27, 2026. First version.

Keen 1.0.0 · 29 lines
// The open serviceable events of a Hardware Management Console (HMC): the hardware problems of the IBM Power
// servers it manages that wait for service. By SSH, on the HMC's command line, since its REST API does not
// serve them. Runs lssvcevents -t hardware --filter "status=open" -F problem_num:status, which only lists.
need('protocol:ssh');

output('open', 'number', array('label' => 'Open serviceable events'));
output('problems', 'text', array('label' => 'Problem numbers'));

watch.above('open-events', 'Serviceable events open', 'open', array(
    'help'    => 'Raises while the HMC holds a hardware problem waiting for service; the HMC tells which in its Serviceable Events Manager.',
    'warning' => 0,
));

// One line per open event, its problem number and its status separated by ":": "1234:open". A line of any
// other form stops the collector: an output it does not understand never reads as "no event".
$events = ssh.run('lssvcevents -t hardware --filter "status=open" -F problem_num:status');
if ($events['exit'] != 0) {
    fail('misconfigured', 'lssvcevents fails, exit ' . $events['exit'], text.trim($events['errors'] . ' ' . $events['output']));
}
$problems = array();
foreach (text.lines($events['output']) as $line) {
    $m = text.match($line, '^([0-9]+):open$');
    if (list.count($m) == 0) {
        fail('misconfigured', 'lssvcevents answers a line the collector does not read', $line);
    }
    $problems = list.add($problems, $m[1]);
}
value('open', list.count($problems));
value('problems', text.join($problems, ', '));