Debian Codegraph @

debian/patches/check_libvirt/fix_uom

raw
1 From ebbf45f0dcbe150f4f8ccb306c8e72e95dbe29d9 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Bj=C3=B6rn=20L=C3=A4ssig?= <[email protected]>
3 Date: Thu, 1 Dec 2016 13:42:17 +0100
4 Subject: [PATCH] fix uom of check_libvirt
5
6 * the actual unit of check_libvirt is 'units', which is not a valid UOM
7 (https://www.monitoring-plugins.org/doc/guidelines.html#AEN201)
8 so tools like icinga2 cannot interprete the performance data
9 * remove the UOM to an empty string
10 -> no unit specified - assume a number (int or float) of things
11 (eg, users, processes, load averages)
12 ---
13 check_libvirt/check_libvirt | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 Index: pkg-nagios-plugins-contrib/check_libvirt/check_libvirt
17 ===================================================================
18 --- pkg-nagios-plugins-contrib.orig/check_libvirt/check_libvirt
19 +++ pkg-nagios-plugins-contrib/check_libvirt/check_libvirt
20 @@ -246,7 +246,7 @@ eval
21 chop($output);
22 chop($output);
23 $output = $up . "/" . $cnt . " VMs up: " . $output;
24 - $np->add_perfdata(label => "vmcount", value => $up, uom => 'units', threshold => $np->threshold);
25 + $np->add_perfdata(label => "vmcount", value => $up, uom => '', threshold => $np->threshold);
26 $result = $np->check_threshold(check => $up);
27 }
28 elsif (uc($command) eq "POOL")