Linux Kernel Version
Edwin Zoeller
Edwin.Zoeller at ama-assn.org
Fri Jun 29 15:19:37 CEST 2012
Thanks to all on this
From: MAD [mailto:mad at b-care.net]
Sent: Friday, June 29, 2012 2:16 AM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Linux Kernel Version
Hi,
You could also do a SNMPWALK on the hrSWInstalledName table (1.3.6.1.2.1.25.6.3) and extract the latest installed kernel version by doing some regex work.
Marc-André
On 06/29/2012 08:45 AM, Stuart Browne wrote:
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
------------------------------------------------------------------------------
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/f8af04f8/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