Bug#803720: sitesummary-client: Nagios plugin check_kernel_status fail with kernels "-ckt"
Package: sitesummary-client
Version: 0.1.18
Severity: important
Tags: patch
The Nagios module to check kernel version number of running and
installed kernels do not work with Canonical Kernel Team kernels.
According to https://lists.debian.org/debian-kernel/2014/11/msg00154.html
this must be done properly.
-- System Information:
Debian Release: 8.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages sitesummary-client depends on:
ii debconf [debconf-2.0] 1.5.56
ii gnupg 1.4.18-7
ii perl 5.20.2-3+deb8u1
ii perl-modules 5.20.2-3+deb8u1
Versions of packages sitesummary-client recommends:
ii cron 3.0pl1-127+deb8u1
ii dmidecode 2.12-3
ii iproute 1:3.16.0-2
ii lsscsi 0.27-3
ii pciutils 1:3.2.1-3
ii usbutils 1:007-2
Versions of packages sitesummary-client suggests:
pn cdpr <none>
pn munin-node <none>
ii nagios-nrpe-server 2.15-1
ii nagios-plugins-standard 2.1.1-1
pn sitesummary <none>
-- debconf information:
db_get sitesummary-client/nagios-server:
sitesummary-client/hostclass:
sitesummary-client/sitegroup:
sitesummary-client/site:
sitesummary-client/collector_url: http://localhost/cgi-bin/sitesummary-collector.cgi
sitesummary-client/enable-nagios-nrpe-config: false
--- /usr/lib/sitesummary/nagios-plugins/check_kernel_status 2014-09-10 14:55:10.000000000 +0200
+++ check_kernel_status 2015-11-02 01:25:18.253340795 +0100
@@ -41,12 +41,14 @@
# New format in kernel package version 3.2.32-1, match first to also work with
# kernel 3.13 and later in Debian.
$sig =~ / Debian (\d+)\.(\d+)\.(\d+)-(\d+)/
+ || $sig =~ / Debian (\d+)\.(\d+)\.(\d+)-ckt(\d+)-(\d+)/
|| $sig =~ /\(Debian (\d+)\.(\d+)\.(\d+)\.dfsg\.(\d+)-(\d+)\)/
|| $sig =~ /\(Debian (\d+)\.(\d+)\.(\d+)\.dfsg\.(\d+)-(\d+)\w+(\d+)\)/
|| $sig =~ /\(Debian (\d+)\.(\d+)\.(\d+)-(\d+).+?(\d+).+?(\d+)\)/
|| $sig =~ /\(Debian (\d+)\.(\d+)\.(\d+)-(\d+)lenny(\d+)\)/
+
)
{
@running_version = ($1, $2, $3, $4, $5 || 0, $6 || 0);
@@ -110,6 +112,10 @@
# Debian Lenny
@installed_version = ($1, $2, $3, $4, 0, 0);
}
+elsif( $dpkg =~ / (\d+)\.(\d+)\.(\d+)-ckt(\d+)-(\d+)/ )
+{
+ @installed_version = ($1, $2, $3, $4, $5, 0);
+}
else
{
print "UNKNOWN - Could not determine installed version ($dpkg).\n";
Reply to: