check_hr

check host resources (Host-Resource-MIB) through SNMP

Release 3.9 latest

Version 3.9

Code cleanup:

  • indentation fixed using 'perltidy -ce -i=2 -pt=2 -l=0'
  • $Id$, $Revision$, $Rev$ changed to $Id$
  • $Id$ now handled by .git/info/attributes after moving from SVN to GIT

Version 3.8

No SNMP response now returns UNKNOWN instead of CRITICAL.

Version 3.7

Added a listing function to check_hr_process.

Version 3.6

Seemingly Solaris (and maybe others) show running processes as "notRunnable / waiting for event". I guess it is therefor the correct setting to show processes as OK if they are identified as being in this state.

Version 3.5

Another hint by Alex made me change BigInt to BigFloat in check_hr_storage. The behaviour is the same and the increased ressource consumption caused by calculating with floats is not worth mentioning.

Also the version 3.4 still had an issue with percentage values caused by a last-minute change. This has now been corrected.

Version 3.4

As requested by Alex T. now there is an implementation of check_hr_storage which supports sizes in percent (%). Values may now be given in mega-, giga-, tera- and petabytes respectively using the suffixes 'M', 'G', 'T', 'P' or obviously '%'. The factor for units defaults to 1024, but you may choose to switch to a factor of 1000 (as vendors do) using the option.

check_hr_storage now uses Math::BigInt to handle all possible sizes. Any feedback on this is greatly appreciated.

Version 3.3

Package is now in version control and has a README and ChangeLog file ;-)

Version 3.2

Version 3.1 introduced an unwanted behaviour on checking partial paths on Unix. For example “/” would also hit “/var” if it was first in the list. So the “feature” (not a bug) of an exact match has now been added.

This means you don’t need to state the full storage name as a parameter, which makes it possible to use this service-check on a whole hostgroup in Nagios, i.e. check “C:” on all “windows-servers” in a single blow, while still allowing for exact matches on Unix-like systems.

Version 3.1

Version 3.1 changed the way the storage-name is checked

  • from $response->{$key} eq $volumeName
  • to $response->{$key} =~ /^$volumeName/

This means you don’t need to state the full storage name as a parameter, which makes it possible to use this service-check on a whole hostgroup in Nagios, i.e. check “C:” on all “windows-servers” in a single blow.

Version 3.0

Version 3.0 includes the new check_hr_cpuload script which allows you to monitor the CPU usage over longer time periods, which in general should be more interesting than a single-point-in-time check:

  • data history is stored in small files on a per-host basis (defaults to /tmp)
  • the amount of data-points is configurable (defaults to 10)

Basically this is an extension of the check_hr_cpu script and therefor works the same for multiple CPUs. If there should be any interest in having an addition switch on both scripts to identify the cpuID let me know. I personally guess there is no big need in having such a restriction.

Version 2.5

First public release.

Query the Host Resource MIB of various operating systems for cpu usage, processes and storage/volumes. These scripts have been tested against Linux and Windows XP, but should do the job for any other OS as well.

The current version is a complete rewrite in Perl and only uses the OID-Trees, so you don’t need to add the Host-Resource-MIB to your local configuration.

check_hr-3.9.tar.gz

19.75 KiB application/x-gzip 2019-03-12 Download