check_hpasm Nagios Plugin README
---------------------

This plugin checks the hardware health of HP Proliant servers with the 
hpasm software installed. It uses the hpasmcli command to acquire the 
condition of the system's critical components like cpus, power supplies,
temperatures, fans and memory modules.

* For instructions on installing this plugin for use with Nagios,
  see below. In addition, generic instructions for the GNU toolchain
  can be found in the INSTALL file.

* For major changes between releases, read the CHANGES file.

* For information on detailed changes that have been made,
  read the Changelog file.

* This plugins is self documenting.  All plugins that comply with
  the basic guidelines for development will provide detailed help when
  invoked with the '-h' or '--help' options.

You can check for the latest plugin at:
  http://www.consol.de/opensource/nagios/check-hpasm

Send mail to gerhard.lausser@consol.de for assistance.  
Please include the OS type and version that you are using.
Also, run the plugin with the '-v' option and provide the resulting 
version information.  Of course, there may be additional diagnostic information
required as well.  Use good judgment.


How to "compile" the check_hpasm script.
--------------------------------------------------------

1) Run the configure script to initialize variables and create a Makefile, etc.

	./configure --prefix=BASEDIRECTORY --with-nagios-user=SOMEUSER --with-nagios-group=SOMEGROUP --with-perl=PATH_TO_PERL --with-noinst-level=LEVEL --with-degrees=UNIT

   a) Replace BASEDIRECTORY with the path of the directory under which Nagios
      is installed (default is '/usr/local/nagios')
   b) Replace SOMEUSER with the name of a user on your system that will be
      assigned permissions to the installed plugins (default is 'nagios')
   c) Replace SOMEGRP with the name of a group on your system that will be
      assigned permissions to the installed plugins (default is 'nagios')
   d) Replace PATH_TO_PERL with the path where a perl binary can be found.
      Besides the system wide perl you might have installed a private perl
      just for the nagios plugins (default is the perl in your path).
   e) Replace LEVEL with one of ok, warning, critical or unknown.
      If the required hpasm-rpm is not installed, the check_hpasm plugin
      will exit with the level specified. If you chose ok, the message
      will say "ok - .... hpasm is not installed". This is different from
      the "ok - hardware working fine" if hpasm was found.
      The default is to treat a missing hpasm package as ok.
   f) Replace UNIT with one of celsius or fahrenheit. The hpasmcli "show temp"
      prints temperatures both in units of celsius and fahrenheit. With the
      --with-degrees option you can decide which units will be shown in an
      alarm message.
      The default is "celsius".

2) "Compile" the plugin with the following command:

	make

    This will produce a "check_hpasm" script. You will also find
    a "check_hpasm.pl" which you better ignore. It is the base for
    the compilation filled with placeholders. These will be replaced during
    the make process.


3) Install the compiled plugin script with the following command:

	make install

   The installation procedure will attempt to place the plugin in a 
   'libexec/' subdirectory in the base directory you specified with
   the --prefix argument to the configure script.


4) Verify that your configuration files for Nagios contains
   the correct paths to the new plugin.


5) Add this line to /etc/sudoers:
   nagios      ALL=NOPASSWD: /sbin/hpasmcli


Command line parameters
-----------------------

-v, --verbose
   Increased verbosity will print how check_hpasm communicates with the
   hpasm daemon and which values were acquired.

-t, --timeout
   The number of seconds after which the plugin will abort.

-b, --blacklist
   If some components of your system are missing (mostly the secondary
   power supply bay is empty) and you tolerate this, then blacklist the
   missing/failed component to avoid false alarms.
   The value for this option is a slash-separated list of components to
   ignore.
   Example: -b p:1,2/f:2/t:3,4/c:1/d:0-1,0-2
   means: ignore power supplies #1 and #2, fan #2, temperature #3 and #4,
   cpu #1 and dimms #1 and #2 in cartridge #0.

-c, --customthresh
   Override the machine-default temperature thresholds.
   Example: -c 1:60/4:80/5:50
   Sets limit for temperature 1 to 60 degrees, temperature 4 to 80 degrees
   and temperature 5 to 50 degrees. You get the consecutive numbers by
   calling check_hpasm -v
   ...
      checking temperatures
       1 processor_zone temperature is 46 (62 max)
       2 cpu#1 temperature is 43 (73 max)
       3 i/o_zone temperature is 54 (68 max)
       4 cpu#2 temperature is 46 (73 max)
       5 power_supply_bay temperature is 38 (55 max)



--
Gerhard Lausser <gerhard.lausser@consol.de>
