check_ipmi.pl

plugin for checking SUN hardware via IPMI ILOM

check_ipmi.pl

COPYRIGHT

This software is Copyright (c) 2009 NETWAYS GmbH, Birger Schmidt

(Except where explicitly superseded by other copyright notices)

Especially, as stated below, it is strongly based on the work of Albert Chu The main reason to derive from his work is to add performance data output. And make the command line switches nagios plugin compliant.

LICENSE

This work is made available to you under the terms of Version 2 of the GNU General Public License. A copy of that license should have been provided with this software, but in any event can be snarfed from http://www.fsf.org.

This work is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 or visit their web page on the internet at http://www.fsf.org.

CONTRIBUTION SUBMISSION POLICY

(The following paragraph is not intended to limit the rights granted to you to modify and distribute this software under the terms of the GNU General Public License and is only of importance to you if you choose to contribute your changes and enhancements to the community by submitting them to NETWAYS GmbH.)

By intentionally submitting any modifications, corrections or derivatives to this work, or any other work intended for use with this Software, to NETWAYS GmbH, you confirm that you are the copyright holder for those contributions and you grant NETWAYS GmbH a nonexclusive, worldwide, irrevocable, royalty-free, perpetual, license to use, copy, create derivative works based on those contributions, and sublicense and distribute those contributions and any derivatives thereof.

Nagios and the Nagios logo are registered trademarks of Ethan Galstad.

nagios_ipmimonitoring.sh

Author: Albert Chu

Description

This script can be used to monitor IPMI sensors in nagios via FreeIPMI's ipmimonitoring utility. The Nominal, Warning, and Critical states of each sensor will be collected and counted. The overall IPMI sensor status will be mapped into a Nagios status of OK, Warning, or Critical. Details will then be output for Nagios to read.

Options

-H - specify hostname(s) to remotely access (don't specify for inband)
-M - specify an alternate ipmimonitoring location
-m - specify additional ipmimonitoring arguments
-v - print debug info
-h - output help

Environment Variables

IPMI_HOSTS - specify hostname(s) to remotely access (don't specify for inband) IPMIMONITORING_PATH - specify an alternate ipmimonitoring location IPMIMONITORING_ARGS - specify additional ipmimonitoring arguments

Setup Notes

Specify the remote hosts you wish to access IPMI information from via the -H option or IPMI_HOSTS environment variable. If you wish only to monitor the local node, do not specify an ipmi host. The input to the -h option is passed directly to ipmimonitoring. So you may specify anything the ipmimonitoring tool accepts including hostranged (i.e. foo[0-127]) or comma separated (i.e. foo0,foo1,foo2,foo3) inputs. If you wish to monitor both remote and local system, remember to specify one of the hosts as "localhost". Most will probably want to monitor just one host (get the IPMI status for each individual machine being monitored), however more than one host can be analyzed for a collective result.

If stored in a non-default location the -M option or IPMIMONITORING_PATH environment variable must be specified to determine the ipmimonitoring location.

In order to specify non-defaults for ipmimonitoring use the -m argument or IPMIMONITORING_ARGS environment variable. Typically, this option is necessary for non-default communication information or authentication information (i.e. driver path, driver type, username, password, etc.). Non-default communication information can also be stored in the FreeIPMI configuration file. This is the suggested method because passwords and other sensitive information could show up in ps(1). If you wish to limit the sensors being monitored, you can also specify which record-ids are to be monitored (-s option).

The default session timeout length in ipmimonitoring is 20 seconds. We would recommend that IPMI not be monitored more frequently than that.

Nagios Exit Codes

0 = OK
1 = WARNING
2 = CRITICAL
3 = UNKNOWN