Tuesday, March 8, 2011

Nagios Check - check_temp_weathergoose

I wrote a check for Nagios to check (and convert to Fahrenheit) the temperature for a Weathergoose environmental monitor.

   This is a simple check that checks the temperature (and converts it to Fahrenheit) for Weathergoose environmental monitors. I would guess this would work fine with other IT Watchdogs environmental monitors, i.e. Supergoose, Microgoose, Minigoose.

Usage: check_temp_weathergoose.sh -H [-f] -w -c
-H - The IP address of the Weathergoose
-C - SNMP Community
-f - Convert output to Fahrenheit
-w - Warning Range
-c - Critical Range


  1. Your script is good but you should really change the snmpwalk to a snmpget. In the version of snmp that I'm using it appends a last line that says "End of MIB" which breaks your script.

  2. Trying to set up your plugin. I've got the script in the Nagios libexec folder and the following commands to call the script:
    define command{
    command name check_server_room_temp
    command_line $USER1$/check_temp.sh -H [-f] -w 80 -c 95
    define command{
    command name check_telco_room_temp
    command_line $USER1$/check_temp.sh -H [-f] -w 80 -c 95

    Getting the following error: Return code of 127 is out of bounds - plugin may be missing.

    Any pointers?

    1. Have you tried running the script directly? One possibility is that it is not executable (i.e. sudo chmod +x check_temp_weathergoose.sh. Also, you may want to change the snmpwalks to snmpgets, as Matt suggested. I don't have a Weathergoose any more to test with.