[BACK]Return to index.html CVS log [TXT][DIR] Up to [local] / nagios / check_hw_sensors

Annotation of nagios/check_hw_sensors/index.html, Revision 1.3

1.1       andrew      1: <html><head><title>Nagios Check - check_hw_sensors</title></head>
                      2:     <body>
                      3:         <h1>Nagios Check - check_hw_sensors</h1>
                      4:         <p>check_hw_sensors plugin for Nagios monitors sysctl hw.sensors on OpenBSD</p>
                      5:         <p>With the new sensor framework in OpenBSD 3.9, I wanted to be able to monitor the new hw.sensors from <a href='http://www.nagios.org/'>Nagios</a> and this is what I have.  It is currently a work in progress although it does seem to work just fine.  The documentation is a bit thin and I don't know how reliable it is.  I would be happy to accept patches.  Send them to <a href='mailto:andrew+nagios@rraz.net'>andrew+nagios@rraz.net</a>.  I know the docs aren't as good as I would like, so if there are places that need clarification, please let me know!</p>
                      6:         <p>What I think is really kewl about this plugin is that it can use the same sensorsd.conf as sensorsd.  That means that they can be easily kept in sync.  But, since Nagios supports both warning and critical alerts, it turned out really handy that sensorsd ignores any additional capabilities in the file.  The addtional capabilities check_hw_sensors supports are described below.  If you have an /etc/sensorsd.conf with the checks you want, it can be run as simply as 'check_hw_sensors -f'.</p>
1.3     ! andrew      7:         <p>TODO:
        !             8:         <ul>
        !             9:             <li>need real documentation.</li>
        !            10:             <li>the ability to check the "status" entry that is in some output.  For example the OK here:<br>
        !            11:             hw.sensors.1=esm0, CPU 1, OK, temp, 31.00 degC / 87.80 degF</li>
        !            12:         </ul>
        !            13:         </p>
1.2       andrew     14:         <p><center><b><a href='check_hw_sensors-1.14.tar.gz'>Download the current version here</a></b></center></p>
1.1       andrew     15:         <h4>
                     16:           Please be sure to support the <a href="http://www.openbsd.org">OpenBSD</a>
                     17:           project by purchasing 
                     18:           <a href="http://www.openbsd.org/items.html">CDs</a>, 
                     19:           <a href="http://www.openbsd.org/tshirts.html">T-shirts</a>, or making a 
                     20:           <a href="http://www.openbsd.org/donations.html">donation</a>.
                     21:           <br />
                     22:           These finances ensure that OpenBSD will continue to exist, and 
                     23:           will remain <a href="http://www.openbsd.org/policy.html">free</a>
                     24:           for everyone to use and reuse as they see fit.
                     25:         </h4>
                     26:         <pre>
                     27:     check_hw_sensors (-f [&lt;FILENAME&gt;]|(-s &lt;hw.sensors id&gt; -w limit -c limit))
                     28: 
                     29: Usage:
                     30:     -f, --filename=FILE
                     31:         FILE to load checks from (defaults to /etc/sensorsd.conf)
                     32:     -s, --sensor=ID
                     33:         ID of a single sensor.  "-s 0" means hw.sensors.0.
                     34:     -w, --warning=RANGE or single ENTRY
                     35:         Exit with WARNING status if outside of RANGE or if != ENTRY
                     36:     -c, --critical=RANGE or single ENTRY
                     37:         Exit with CRITICAL status if outside of RANGE or if != ENTRY
                     38: 
                     39:     -h (--help)       usage help
                     40:         </pre>
                     41:         <p>FILE is in the same format as <a href='http://www.openbsd.org/cgi-bin/man.cgi?query=sensorsd.conf'>sensorsd.conf(5)</a> plus some additional entries.  These additional entries in the file are ignored by <a href='http://www.openbsd.org/cgi-bin/man.cgi?query=sensorsd'>sensorsd(8)</a>.  </p>
                     42: 
                     43:         <p>check_hw_sensors understands the following entries:<br>
                     44:         low, high, crit, warn, crit.low, crit.high, warn.low, warn.high</p>
                     45: 
                     46:         <p>An ENTRY depends on the type.  The descriptions in <a href='http://www.openbsd.org/cgi-bin/man.cgi?query=sensorsd.conf'>sensorsd.conf(5)</a>
                     47:         can be used when appropriate, or you can use the following:
                     48: 
                     49:         <ul>
                     50:             <li>volts_dc, fanrpm or raw<br>
                     51:             Anything that includes digits.
                     52:             Both the value of the check and the value of the sensor
                     53:             response that are not either a digit or period are stripped
                     54:             and then the two resultant values are compared.</li>
                     55: 
                     56:             <li>temp<br>
                     57:             Can be as above, but if the entry has an F in it,
                     58:             it compares farenheit, otherwise it uses celcius.</li>
                     59: 
                     60:             <li>indicator or drive<br>
                     61:             does a case sensitive match of each
                     62:             entry in the comma separated list and if it does not match
                     63:             any of the entries, it matches the status.  Does not support any low or high entries.</li>
                     64:         </ul>
                     65: 
                     66:         <p>The entries 'crit' or 'warn' (or the -c or -w on the command line)
                     67:         may be a RANGE or a comma separated list of acceptable values.
                     68:         The comma separated list of values contains a list of things that
                     69:         will NOT cause the status.  This is possibly counterintuitive, but
                     70:         you are more likely to know good values than bad values.</p>
                     71: 
                     72:         <p>A RANGE is a low ENTRY and a high ENTRY separated by a colon (:).
                     73:         It can also be low: or :high with the other side left blank to only
                     74:         make the single check..<p>
                     75: 
1.2       andrew     76:         <p>check_hw_sensors (nagios-plugins 1.4.2) 1.14<br>
1.1       andrew     77:         The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
                     78:         copies of the plugins under the terms of the GNU General Public License.
                     79:         For more information about these matters, see the file named COPYING.</p>
                     80:         <h3>Example Sensorsd.conf</h3>
                     81:         <pre>
                     82: # $OpenBSD: sensorsd.conf,v 1.1 2003/10/08 20:30:04 grange Exp $
                     83: # $ RedRiver: sensorsd.conf,v 1.1 2006/05/03 21:48:42 andrew Exp $
                     84: 
                     85: #
                     86: # Sample sensorsd.conf file. See sensorsd.conf(5) for details.
                     87: # This one has examples for use with nagios check_hw_sensors
                     88: # Actual sensors on a 2450 are below.
                     89: #
                     90: 
                     91: # hw.sensors.0=esm0, Motherboard, raw, 0
                     92: # hw.sensors.1=esm0, CPU 1, OK, temp, 28.00 degC / 82.40 degF
                     93: hw.sensors.1:high=50C:warn.high=40C
                     94: 
                     95: # hw.sensors.2=esm0, CPU 2, OK, temp, 30.00 degC / 86.00 degF
                     96: hw.sensors.2:high=50C:warn.high=40C
                     97: 
                     98: # hw.sensors.3=esm0, Mainboard, OK, temp, 21.50 degC / 70.70 degF
                     99: hw.sensors.3:high=40C:warn.high=30C
                    100: 
                    101: # hw.sensors.4=esm0, CPU 1 Core, OK, volts_dc, 1.69 V
                    102: hw.sensors.4:high=1.85V:warn.high=1.8V:low=1.60V:warn.low=1.65V
                    103: 
                    104: # hw.sensors.5=esm0, CPU 2 Core, OK, volts_dc, 1.70 V
                    105: hw.sensors.5:high=1.85V:warn.high=1.8V:low=1.60V:warn.low=1.65V
                    106: 
                    107: # hw.sensors.6=esm0, Motherboard +5V, OK, volts_dc, 4.95 V
                    108: hw.sensors.6:high=5.1V:warn.high=5.05V:low=4.90V:warn.low=4.85V
                    109: 
                    110: # hw.sensors.7=esm0, Motherboard +12V, OK, volts_dc, 11.94 V
                    111: hw.sensors.7:high=12.15V:warn.high=12.1V:low=11.8V:warn.low=11.85V
                    112: 
                    113: # hw.sensors.8=esm0, Motherboard +3.3V, OK, volts_dc, 3.27 V
                    114: hw.sensors.8:high=3.5V:warn.high=3.4V:low=3.15V:warn.low=3.2V
                    115: 
                    116: # hw.sensors.9=esm0, Motherboard +2.5V, OK, volts_dc, 2.48 V
                    117: hw.sensors.9:high=2.75V:warn.high=2.6V:low=2.25V:warn.low=2.4V
                    118: 
                    119: # hw.sensors.10=esm0, Motherboard GTL Term, OK, volts_dc, 1.49 V
                    120: hw.sensors.10:high=1.75V:warn.high=1.6V:low=1.25V:warn.low=1.4V
                    121: 
                    122: # hw.sensors.11=esm0, Motherboard Battery, OK, volts_dc, 2.93 V
                    123: hw.sensors.11:high=3.1V:warn.high=3.05V:low=2.75V:warn.low=2.8V
                    124: 
                    125: # hw.sensors.12=esm0, Chassis Intrusion, indicator, Off
                    126: hw.sensors.12:crit=Off:warn=Off
                    127: 
                    128: # hw.sensors.13=esm0, Fan 1, OK, fanrpm, 3526 RPM
                    129: hw.sensors.13:low=3000:warn.low=3250
                    130: 
                    131: # hw.sensors.14=esm0, Fan 2, OK, fanrpm, 3569 RPM
                    132: hw.sensors.14:low=3000:warn.low=3250
                    133: 
                    134: # hw.sensors.15=esm0, Fan 3, OK, fanrpm, 3563 RPM
                    135: hw.sensors.15:low=3000:warn.low=3250
                    136: 
                    137: # hw.sensors.16=esm0, Backplane, raw, 0
                    138: # hw.sensors.17=esm0, Backplane Top, OK, temp, 14.50 degC / 58.10 degF
                    139: hw.sensors.17:high=35C:warn.high=25C
                    140: 
                    141: # hw.sensors.18=esm0, Backplane Bottom, OK, temp, 22.00 degC / 71.60 degF
                    142: hw.sensors.18:high=40C:warn.high=30C
                    143: 
                    144: # hw.sensors.19=esm0, Backplane +5V, OK, volts_dc, 4.97 V
                    145: hw.sensors.19:high=5.1V:warn.high=5.05V:low=4.90V:warn.low=4.85V
                    146: 
                    147: # hw.sensors.20=esm0, Backplane SCSI A Connected, indicator, On
                    148: hw.sensors.20:crit=On:warn=On
                    149: 
                    150: # hw.sensors.21=esm0, Backplane SCSI A External, OK, volts_dc, 4.70 V
                    151: hw.sensors.21:high=5.1V:warn.high=5.05V:low=4.60V:warn.low=4.65V
                    152: 
                    153: # hw.sensors.22=esm0, Backplane SCSI B Connected, indicator, Off
                    154: hw.sensors.22:crit=Off:warn=Off
                    155: 
                    156: # hw.sensors.23=esm0, Drive 0, drive, online
                    157: hw.sensors.23:crit=online,empty:warn=online
                    158: 
                    159: # hw.sensors.24=esm0, Drive 1, drive, online
                    160: hw.sensors.24:crit=online,empty:warn=online
                    161: 
                    162: # hw.sensors.25=esm0, Drive 2, drive, empty
                    163: hw.sensors.25:crit=online,empty:warn=online,empty
                    164: 
                    165: # hw.sensors.26=esm0, Drive 3, drive, empty
                    166: hw.sensors.26:crit=online,empty:warn=online,empty
                    167: 
                    168: # hw.sensors.27=esm0, Backplane Control 2, raw, 17
                    169: # hw.sensors.28=esm0, Backplane +3.3V, OK, volts_dc, 3.28 V
                    170: hw.sensors.28:high=3.5V:warn.high=3.4V:low=3.2V:warn.low=3.25V
                    171: 
                    172: # hw.sensors.29=safte0, temp0, OK, temp, 14.44 degC / 58.00 degF
                    173: hw.sensors.29:high=35C:warn.high=25C
                    174: 
                    175: # hw.sensors.30=safte0, temp1, OK, temp, 22.22 degC / 72.00 degF
                    176: hw.sensors.30:high=40C:warn.high=30C
                    177:         </pre>
                    178:         <h3>Example output from sysctl hw.sensors from that box</h3>
                    179:         <pre>
                    180: hw.sensors.0=esm0, Motherboard, raw, 0
                    181: hw.sensors.1=esm0, CPU 1, OK, temp, 30.00 degC / 86.00 degF
                    182: hw.sensors.2=esm0, CPU 2, OK, temp, 31.00 degC / 87.80 degF
                    183: hw.sensors.3=esm0, Mainboard, OK, temp, 19.50 degC / 67.10 degF
                    184: hw.sensors.4=esm0, CPU 1 Core, OK, volts_dc, 1.69 V
                    185: hw.sensors.5=esm0, CPU 2 Core, OK, volts_dc, 1.70 V
                    186: hw.sensors.6=esm0, Motherboard +5V, OK, volts_dc, 4.95 V
                    187: hw.sensors.7=esm0, Motherboard +12V, OK, volts_dc, 11.93 V
                    188: hw.sensors.8=esm0, Motherboard +3.3V, OK, volts_dc, 3.27 V
                    189: hw.sensors.9=esm0, Motherboard +2.5V, OK, volts_dc, 2.48 V
                    190: hw.sensors.10=esm0, Motherboard GTL Term, OK, volts_dc, 1.49 V
                    191: hw.sensors.11=esm0, Motherboard Battery, OK, volts_dc, 2.94 V
                    192: hw.sensors.12=esm0, Chassis Intrusion, indicator, Off
                    193: hw.sensors.13=esm0, Fan 1, OK, fanrpm, 3514 RPM
                    194: hw.sensors.14=esm0, Fan 2, OK, fanrpm, 3582 RPM
                    195: hw.sensors.15=esm0, Fan 3, OK, fanrpm, 3570 RPM
                    196: hw.sensors.16=esm0, Backplane, raw, 0
                    197: hw.sensors.17=esm0, Backplane Top, OK, temp, 14.50 degC / 58.10 degF
                    198: hw.sensors.18=esm0, Backplane Bottom, OK, temp, 22.50 degC / 72.50 degF
                    199: hw.sensors.19=esm0, Backplane +5V, OK, volts_dc, 4.97 V
                    200: hw.sensors.20=esm0, Backplane SCSI A Connected, indicator, On
                    201: hw.sensors.21=esm0, Backplane SCSI A External, OK, volts_dc, 4.70 V
                    202: hw.sensors.22=esm0, Backplane SCSI B Connected, indicator, Off
                    203: hw.sensors.23=esm0, Drive 0, drive, online
                    204: hw.sensors.24=esm0, Drive 1, drive, online
                    205: hw.sensors.25=esm0, Drive 2, drive, empty
                    206: hw.sensors.26=esm0, Drive 3, drive, empty
                    207: hw.sensors.27=esm0, Backplane Control 2, raw, 17
                    208: hw.sensors.28=esm0, Backplane +3.3V, OK, volts_dc, 3.28 V
                    209: hw.sensors.29=safte0, temp0, OK, temp, 15.00 degC / 59.00 degF
                    210: hw.sensors.30=safte0, temp1, OK, temp, 22.78 degC / 73.00 degF
                    211:         </pre>
                    212:         <p>Andrew Fresh &lt;<a href='mailto:andrew@mad-techies.org'>andrew@mad-techies.org</a>&gt;</p>
1.3     ! andrew    213:         <p><small>$RedRiver: index.html,v 1.2 2006/05/04 01:31:29 andrew Exp $</small></p>
1.1       andrew    214:     </body>
                    215: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>