Linux Kernel Version
Edwin Zoeller
Edwin.Zoeller at ama-assn.org
Fri Jun 29 12:40:32 CEST 2012
It would be what is installed. This came up yesterday during a migration of some VM's. These hosts would not come up after we moved them and was found to be a bug in the kernel for that version 5.5. Want to scan the other hosts scheduled for migration.
Thanks,
Ed
From: Stuart Browne [mailto:stuart.browne at ausregistry.com.au]
Sent: Friday, June 29, 2012 01:45 AM
To: Nagios Users List <nagios-users at lists.sourceforge.net>
Subject: Re: [Nagios-users] Linux Kernel Version
Current as in installed, or current as in available?
We wrote this a while ago to see if the most recently installed kernel is the bootable kernel:
#!/bin/bash
#
# Check if current kernel is being used.
#
GRUBBY=/sbin/grubby
GREP=/bin/grep
UNAME=/bin/uname
OUTPUT="Current kernel running."
EXIT_VAL=0
if $GRUBBY --default-kernel | $GREP -vq $($UNAME -r); then
OUTPUT="Kernel updated, reboot required."
EXIT_VAL=1
fi
echo $OUTPUT
exit $EXIT_VAL
But as Daniel said, a trivial plugin it's NRPE calling the two-line routine:
#!/bin/bash
/bin/uname -r
exit $?
Or using SNMP:
define command {
command_name return_kernel_version
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -o SNMPv2-MIB::sysDescr.0 -P 2c -C public
}
The choice of what to use is yours.
Stuart
From: Daniel Wittenberg [mailto:daniel.wittenberg.r0ko at statefarm.com]
Sent: Friday, 29 June 2012 1:18 PM
To: Nagios Users List
Subject: Re: [Nagios-users] Linux Kernel Version
I haven't seen one, but would be trivial to write one. You looking to see the rpm -q kernel output or something like uname -a?
Dan
On Jun 28, 2012, at 10:10 PM, Edwin Zoeller wrote:
Does anyone know of or have a plugin that will display the current kernel level for Redhat?
Thanks,
Ed
P Please consider the environment before printing this e-mail
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net<mailto:Nagios-users at lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120629/b9fff7eb/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list