[Pkg-nagios-devel] Bug#792412: Bug#792412: please include check_deb_kernel_version

Tomas Pospisek tpo at sourcepole.ch
Tue Jul 14 16:45:28 UTC 2015

Hi Jan,

thanks for looking into this... :

On Tue, 14 Jul 2015, Jan Wagner wrote:

> Hi Tomas,
> Am 14.07.15 um 17:29 schrieb Tomas Pospisek:
>> I'd be very happy if you could include the
>> check_deb_kernel_version script. It checks whether there's a newer
>> kernel installed than currently running or in other words if the
>> machine should be rebooted into a fresher kernel (probably because
>> the current one has security issues...).
> what about using check_running_kernel? :-)
> $ apt-cache show nagios-plugins-contrib | grep kernel
>     * check_running_kernel: check if a system was rebooted after
>       a kernel upgrade

The problem is that it actually doesn't do that:

First machine:

   # apt-get install --no-install-recommends nagios-plugins-contrib
   # /usr/lib/nagios/plugins/check_running_kernel
   UNKNOWN: Failed to get a version string from image /boot/vmlinuz-3.16.0-0.bpo.4-amd64

True, this is not the same problem as reported but:

Second machine:

   # apt-get install --no-install-recommends nagios-plugins-contrib
   # /usr/lib/nagios/plugins/check_running_kernel
   OK: Running kernel matches on disk image: [Linux version 3.13.0-43-generic (buildd at tipua) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014]


   # ls /boot/vm*
   /boot/vmlinuz-3.13.0-43-generic  /boot/vmlinuz-3.13.0-57-generic

Note: the running kernel < the latest installed kernel
-> this machine should be rebooted

Sure this is an Ubuntu machine, but AFAIK this specific problem is 
identical over Debian/Ubuntu so there no difference here, but..

Unfortunately I don't have a machine at hand that has a newer kernel and 
is Debian, but as far as I can see from looking at the sources of 
check_running_kernel, it does *not check* whether there's a newer kernel 
installed that the one that is running.

In case you have such a case, could you please check?

Should I reopen the bug report?

Best greetings,

More information about the Pkg-nagios-devel mailing list