[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.4

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>
1.4     ! andrew      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.  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>New in this release is the ability to check the sensors that report their status.  Since many sensors support this, it can make the size of your sensorsd.conf much smaller.  For example, check_hw_sensors will automatically check these two sensors:
        !             7:                <ul>
        !             8:                        <li>hw.sensors.76=esm0, Fan 4, OK, fanrpm, 3629 RPM</li>
        !             9:                        <li>hw.sensors.77=esm0, Fan 5, CRITICAL, fanrpm, 0 RPM</li>
        !            10:                </ul>
        !            11:                It will report the status listed to Nagios.  For 76, it would be OK, for 77 it would be CRITICAL.  You don't need to put anything in a config file to support those.</p>
        !            12:         <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'.  If you only want to check the sensors that report their status, you can ever run it as just 'check_hw_sensors'.</p>
1.3       andrew     13:         <p>TODO:
                     14:         <ul>
                     15:             <li>need real documentation.</li>
1.4     ! andrew     16:                        <li>the RANGE using the colon to separate probably screws up the getcap of sensorsd.conf, so it should probably get replaced with a dash or somesuch</li>
1.3       andrew     17:         </ul>
                     18:         </p>
1.4     ! andrew     19:         <p><center><b><a href='check_hw_sensors-1.17.tar.gz'>Download the current version here</a></b></center></p>
1.1       andrew     20:         <h4>
                     21:           Please be sure to support the <a href="http://www.openbsd.org">OpenBSD</a>
                     22:           project by purchasing 
                     23:           <a href="http://www.openbsd.org/items.html">CDs</a>, 
                     24:           <a href="http://www.openbsd.org/tshirts.html">T-shirts</a>, or making a 
                     25:           <a href="http://www.openbsd.org/donations.html">donation</a>.
                     26:           <br />
                     27:           These finances ensure that OpenBSD will continue to exist, and 
                     28:           will remain <a href="http://www.openbsd.org/policy.html">free</a>
                     29:           for everyone to use and reuse as they see fit.
                     30:         </h4>
                     31:         <pre>
1.4     ! andrew     32:     check_hw_sensors [-i] (-f [&lt;FILENAME&gt;]|(-s &lt;hw.sensors id&gt; [-w limit] [-c limit]))
1.1       andrew     33: 
                     34: Usage:
1.4     ! andrew     35:     -i, --ignore-status
        !            36:         Don't check the status of sensors that report it.
1.1       andrew     37:     -f, --filename=FILE
                     38:         FILE to load checks from (defaults to /etc/sensorsd.conf)
                     39:     -s, --sensor=ID
                     40:         ID of a single sensor.  "-s 0" means hw.sensors.0.
                     41:     -w, --warning=RANGE or single ENTRY
                     42:         Exit with WARNING status if outside of RANGE or if != ENTRY
                     43:     -c, --critical=RANGE or single ENTRY
                     44:         Exit with CRITICAL status if outside of RANGE or if != ENTRY
                     45:         </pre>
                     46:         <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>
                     47: 
                     48:         <p>check_hw_sensors understands the following entries:<br>
1.4     ! andrew     49:                low, high, crit, warn, crit.low, crit.high, warn.low, warn.high, 
        !            50:                ignore, status</p>
1.1       andrew     51: 
                     52:         <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>
                     53:         can be used when appropriate, or you can use the following:
                     54: 
                     55:         <ul>
                     56:             <li>volts_dc, fanrpm or raw<br>
                     57:             Anything that includes digits.
                     58:             Both the value of the check and the value of the sensor
                     59:             response that are not either a digit or period are stripped
                     60:             and then the two resultant values are compared.</li>
                     61: 
                     62:             <li>temp<br>
                     63:             Can be as above, but if the entry has an F in it,
                     64:             it compares farenheit, otherwise it uses celcius.</li>
                     65: 
                     66:             <li>indicator or drive<br>
                     67:             does a case sensitive match of each
                     68:             entry in the comma separated list and if it does not match
                     69:             any of the entries, it matches the status.  Does not support any low or high entries.</li>
                     70:         </ul>
                     71: 
                     72:         <p>The entries 'crit' or 'warn' (or the -c or -w on the command line)
                     73:         may be a RANGE or a comma separated list of acceptable values.
                     74:         The comma separated list of values contains a list of things that
                     75:         will NOT cause the status.  This is possibly counterintuitive, but
                     76:         you are more likely to know good values than bad values.</p>
                     77: 
                     78:         <p>A RANGE is a low ENTRY and a high ENTRY separated by a colon (:).
                     79:         It can also be low: or :high with the other side left blank to only
                     80:         make the single check..<p>
                     81: 
1.4     ! andrew     82:                <p>An entry marked "ignore" will cause that sensor to be skipped.
        !            83:                Generally used with status checking of all sensors to ignore sensors you
        !            84:                don't care about or that report incorrectly.</p>
        !            85: 
        !            86:                <p>If you are using --ignore-status, you can still check the status of
        !            87:                individual sensors with a status entry.</p>
        !            88: 
        !            89:         <p>check_hw_sensors (nagios-plugins 1.4.2) 1.17<br>
1.1       andrew     90:         The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
                     91:         copies of the plugins under the terms of the GNU General Public License.
                     92:         For more information about these matters, see the file named COPYING.</p>
1.4     ! andrew     93: 
        !            94:         <h3>Example sensorsd.conf</h3>
1.1       andrew     95:         <pre>
1.4     ! andrew     96: # hw.sensors.3=esm0, Ambient, OK, temp, 21.50 degC / 70.70 degF
        !            97: hw.sensors.3:high=28C:warn.high=25C
1.1       andrew     98: 
                     99: # hw.sensors.12=esm0, Chassis Intrusion, indicator, Off
1.4     ! andrew    100: hw.sensors.12:warn=Off
1.1       andrew    101: 
1.4     ! andrew    102: # hw.sensors.29=esm0, Drive 0, drive, online
        !           103: hw.sensors.29:crit=online
        !           104: # hw.sensors.30=esm0, Drive 1, drive, online
        !           105: hw.sensors.30:crit=online
        !           106: # hw.sensors.31=esm0, Drive 2, drive, unknown
        !           107: # hw.sensors.32=esm0, Drive 3, drive, unknown
        !           108: # hw.sensors.33=esm0, Drive 4, drive, online
        !           109: hw.sensors.33:crit=online
        !           110: # hw.sensors.34=esm0, Drive 5, drive, online
        !           111: hw.sensors.34:crit=online
        !           112: # hw.sensors.35=esm0, Drive 6, drive, unknown
        !           113: # hw.sensors.36=esm0, Drive 7, drive, unknown
        !           114: 
        !           115: # hw.sensors.70=esm0, Power Supply 1 AC, indicator, On
        !           116: hw.sensors.70:crit=On
        !           117: # hw.sensors.71=esm0, Power Supply 1 SW, indicator, On
        !           118: hw.sensors.71:crit=On
        !           119: # hw.sensors.72=esm0, Power Supply 1 OK, indicator, On
        !           120: hw.sensors.72:crit=On
        !           121: # hw.sensors.74=esm0, Power Supply 1 FFAN, indicator, Off
        !           122: hw.sensors.74:crit=Off
        !           123: # hw.sensors.75=esm0, Power Supply 1 OTMP, indicator, Off
        !           124: hw.sensors.75:crit=Off
        !           125: 
        !           126: # hw.sensors.76=esm0, Power Supply 2 AC, indicator, On
        !           127: hw.sensors.76:crit=On
        !           128: # hw.sensors.77=esm0, Power Supply 2 SW, indicator, On
        !           129: hw.sensors.77:crit=On
        !           130: # hw.sensors.78=esm0, Power Supply 2 OK, indicator, On
        !           131: hw.sensors.78:crit=On
        !           132: # hw.sensors.80=esm0, Power Supply 2 FFAN, indicator, Off
        !           133: hw.sensors.80:crit=Off
        !           134: # hw.sensors.81=esm0, Power Supply 2 OTMP, indicator, Off
        !           135: hw.sensors.81:crit=Off
        !           136: 
        !           137: # hw.sensors.82=esm0, Power Supply 3 AC, indicator, On
        !           138: hw.sensors.82:crit=On
        !           139: # hw.sensors.83=esm0, Power Supply 3 SW, indicator, On
        !           140: hw.sensors.83:crit=On
        !           141: # hw.sensors.84=esm0, Power Supply 3 OK, indicator, On
        !           142: hw.sensors.84:crit=On
        !           143: # hw.sensors.86=esm0, Power Supply 3 FFAN, indicator, Off
        !           144: hw.sensors.86:crit=Off
        !           145: # hw.sensors.87=esm0, Power Supply 3 OTMP, indicator, Off
        !           146: hw.sensors.87:crit=Off
        !           147: 
        !           148: # hw.sensors.88=esm0, Fan 1, CRITICAL, fanrpm, 0 RPM
        !           149: hw.sensors.88:ignore
        !           150: # hw.sensors.89=esm0, Fan 2, CRITICAL, fanrpm, 0 RPM
        !           151: hw.sensors.89:ignore
        !           152: # hw.sensors.90=esm0, Fan 3, CRITICAL, fanrpm, 0 RPM
        !           153: hw.sensors.90:ignore
        !           154: # hw.sensors.91=esm0, Fan 4, CRITICAL, fanrpm, 0 RPM
        !           155: hw.sensors.91:ignore
        !           156: # hw.sensors.92=esm0, Fan 5, CRITICAL, fanrpm, 0 RPM
        !           157: hw.sensors.92:ignore
        !           158: # hw.sensors.93=esm0, Fan 6, CRITICAL, fanrpm, 0 RPM
        !           159: hw.sensors.93:ignore
1.1       andrew    160:         </pre>
                    161:         <h3>Example output from sysctl hw.sensors from that box</h3>
                    162:         <pre>
1.4     ! andrew    163: hw.sensors.0=esm0, CPU 1, OK, temp, 36.00 degC / 96.80 degF
        !           164: hw.sensors.1=esm0, CPU 2, OK, temp, 41.00 degC / 105.80 degF
        !           165: hw.sensors.2=esm0, Mainboard, OK, temp, 28.00 degC / 82.40 degF
        !           166: hw.sensors.3=esm0, Ambient, OK, temp, 21.50 degC / 70.70 degF
        !           167: hw.sensors.4=esm0, CPU 1 Core, OK, volts_dc, 1.65 V
        !           168: hw.sensors.5=esm0, CPU 2 Core, OK, volts_dc, 1.67 V
        !           169: hw.sensors.6=esm0, Motherboard +5V, OK, volts_dc, 4.98 V
        !           170: hw.sensors.7=esm0, Motherboard +12V, OK, volts_dc, 11.97 V
        !           171: hw.sensors.8=esm0, Motherboard +3.3V, OK, volts_dc, 3.25 V
        !           172: hw.sensors.9=esm0, Motherboard +2.5V, OK, volts_dc, 2.49 V
        !           173: hw.sensors.10=esm0, Motherboard GTL Term, OK, volts_dc, 1.50 V
        !           174: hw.sensors.11=esm0, Motherboard Battery, OK, volts_dc, 2.92 V
1.1       andrew    175: hw.sensors.12=esm0, Chassis Intrusion, indicator, Off
1.4     ! andrew    176: hw.sensors.13=esm0, Chassis Fan Ctrl, raw, 2
        !           177: hw.sensors.14=esm0, Fan 1, OK, fanrpm, 3839 RPM
        !           178: hw.sensors.15=esm0, Fan 2, OK, fanrpm, 4040 RPM
        !           179: hw.sensors.16=esm0, Backplane Control, raw, 227
        !           180: hw.sensors.17=esm0, Backplane Top, OK, temp, 30.00 degC / 86.00 degF
        !           181: hw.sensors.18=esm0, Backplane Bottom, OK, temp, 29.50 degC / 85.10 degF
1.1       andrew    182: hw.sensors.19=esm0, Backplane +5V, OK, volts_dc, 4.97 V
1.4     ! andrew    183: hw.sensors.20=esm0, Backplane +12V, OK, volts_dc, 12.06 V
        !           184: hw.sensors.21=esm0, Backplane Board, OK, volts_dc, 2.83 V
        !           185: hw.sensors.22=esm0, Backplane Fan Control, raw, 8738
        !           186: hw.sensors.23=esm0, Backplane Fan 1, OK, fanrpm, 3690 RPM
        !           187: hw.sensors.24=esm0, Backplane Fan 2, OK, fanrpm, 3552 RPM
        !           188: hw.sensors.25=esm0, Backplane Fan 3, OK, fanrpm, 3505 RPM
        !           189: hw.sensors.26=esm0, Backplane SCSI A Connected, indicator, On
        !           190: hw.sensors.27=esm0, Backplane SCSI A External, OK, volts_dc, 4.68 V
        !           191: hw.sensors.28=esm0, Backplane SCSI A Internal, OK, volts_dc, 4.79 V
        !           192: hw.sensors.29=esm0, Drive 0, drive, online
        !           193: hw.sensors.30=esm0, Drive 1, drive, online
        !           194: hw.sensors.31=esm0, Drive 2, drive, unknown
        !           195: hw.sensors.32=esm0, Drive 3, drive, unknown
        !           196: hw.sensors.33=esm0, Drive 4, drive, online
        !           197: hw.sensors.34=esm0, Drive 5, drive, online
        !           198: hw.sensors.35=esm0, Drive 6, drive, unknown
        !           199: hw.sensors.36=esm0, Drive 7, drive, unknown
        !           200: hw.sensors.37=esm0, Power Supply 1 +5V, volts_dc, 5.07 V
        !           201: hw.sensors.38=esm0, Power Supply 1 +12V, volts_dc, 12.13 V
        !           202: hw.sensors.39=esm0, Power Supply 1 +3.3V, volts_dc, 3.32 V
        !           203: hw.sensors.40=esm0, Power Supply 1 -5V, volts_dc, 5.08 V
        !           204: hw.sensors.41=esm0, Power Supply 1 -12V, volts_dc, 12.20 V
        !           205: hw.sensors.42=esm0, Power Supply 2 +5V, volts_dc, 5.09 V
        !           206: hw.sensors.43=esm0, Power Supply 2 +12V, volts_dc, 12.08 V
        !           207: hw.sensors.44=esm0, Power Supply 2 +3.3V, volts_dc, 3.34 V
        !           208: hw.sensors.45=esm0, Power Supply 2 -5V, volts_dc, 5.01 V
        !           209: hw.sensors.46=esm0, Power Supply 2 -12V, volts_dc, 12.03 V
        !           210: hw.sensors.47=esm0, Power Supply 3 +5V, volts_dc, 5.03 V
        !           211: hw.sensors.48=esm0, Power Supply 3 +12V, volts_dc, 12.15 V
        !           212: hw.sensors.49=esm0, Power Supply 3 +3.3V, volts_dc, 3.34 V
        !           213: hw.sensors.50=esm0, Power Supply 3 -5V, volts_dc, 5.03 V
        !           214: hw.sensors.51=esm0, Power Supply 3 -12V, volts_dc, 11.97 V
        !           215: hw.sensors.52=esm0, System Power Supply +5V, volts_dc, 5.02 V
        !           216: hw.sensors.53=esm0, System Power Supply +12V, volts_dc, 12.09 V
        !           217: hw.sensors.54=esm0, System Power Supply +3.3V, volts_dc, 3.32 V
        !           218: hw.sensors.55=esm0, System Power Supply -5V, volts_dc, 4.91 V
        !           219: hw.sensors.56=esm0, System Power Supply -12V, volts_dc, 11.82 V
        !           220: hw.sensors.57=esm0, System Power Supply +5V aux, volts_dc, 5.16 V
        !           221: hw.sensors.58=esm0, Power Supply 1 +5V, OK, amps, 2.40 A
        !           222: hw.sensors.59=esm0, Power Supply 1 +12V, OK, amps, 1.00 A
        !           223: hw.sensors.60=esm0, Power Supply 1 +3.3V, OK, amps, 1.80 A
        !           224: hw.sensors.61=esm0, Power Supply 2 +5V, OK, amps, 2.80 A
        !           225: hw.sensors.62=esm0, Power Supply 2 +12V, OK, amps, 1.20 A
        !           226: hw.sensors.63=esm0, Power Supply 2 +3.3V, OK, amps, 1.60 A
        !           227: hw.sensors.64=esm0, Power Supply 3 +5V, OK, amps, 1.20 A
        !           228: hw.sensors.65=esm0, Power Supply 3 +12V, OK, amps, 1.00 A
        !           229: hw.sensors.66=esm0, Power Supply 3 +3.3V, OK, amps, 1.60 A
        !           230: hw.sensors.67=esm0, Power Supply 1 Fan, OK, fanrpm, 3726 RPM
        !           231: hw.sensors.68=esm0, Power Supply 2 Fan, OK, fanrpm, 4042 RPM
        !           232: hw.sensors.69=esm0, Power Supply 3 Fan, OK, fanrpm, 3606 RPM
        !           233: hw.sensors.70=esm0, Power Supply 1 AC, indicator, On
        !           234: hw.sensors.71=esm0, Power Supply 1 SW, indicator, On
        !           235: hw.sensors.72=esm0, Power Supply 1 OK, indicator, On
        !           236: hw.sensors.73=esm0, Power Supply 1 ON, OK, indicator, On
        !           237: hw.sensors.74=esm0, Power Supply 1 FFAN, indicator, Off
        !           238: hw.sensors.75=esm0, Power Supply 1 OTMP, indicator, Off
        !           239: hw.sensors.76=esm0, Power Supply 2 AC, indicator, On
        !           240: hw.sensors.77=esm0, Power Supply 2 SW, indicator, On
        !           241: hw.sensors.78=esm0, Power Supply 2 OK, indicator, On
        !           242: hw.sensors.79=esm0, Power Supply 2 ON, OK, indicator, On
        !           243: hw.sensors.80=esm0, Power Supply 2 FFAN, indicator, Off
        !           244: hw.sensors.81=esm0, Power Supply 2 OTMP, indicator, Off
        !           245: hw.sensors.82=esm0, Power Supply 3 AC, indicator, On
        !           246: hw.sensors.83=esm0, Power Supply 3 SW, indicator, On
        !           247: hw.sensors.84=esm0, Power Supply 3 OK, indicator, On
        !           248: hw.sensors.85=esm0, Power Supply 3 ON, OK, indicator, On
        !           249: hw.sensors.86=esm0, Power Supply 3 FFAN, indicator, Off
        !           250: hw.sensors.87=esm0, Power Supply 3 OTMP, indicator, Off
        !           251: hw.sensors.88=esm0, Fan 1, CRITICAL, fanrpm, 0 RPM
        !           252: hw.sensors.89=esm0, Fan 2, CRITICAL, fanrpm, 0 RPM
        !           253: hw.sensors.90=esm0, Fan 3, CRITICAL, fanrpm, 0 RPM
        !           254: hw.sensors.91=esm0, Fan 4, CRITICAL, fanrpm, 0 RPM
        !           255: hw.sensors.92=esm0, Fan 5, CRITICAL, fanrpm, 0 RPM
        !           256: hw.sensors.93=esm0, Fan 6, CRITICAL, fanrpm, 0 RPM
        !           257: hw.sensors.94=esm0, Fan Enclosure, raw, 42498
        !           258: hw.sensors.95=safte0, fan0, OK, indicator, On
        !           259: hw.sensors.96=safte0, fan1, OK, indicator, On
        !           260: hw.sensors.97=safte0, fan2, OK, indicator, On
        !           261: hw.sensors.98=safte0, temp0, OK, temp, 30.00 degC / 86.00 degF
        !           262: hw.sensors.99=safte0, temp1, OK, temp, 29.44 degC / 85.00 degF
1.1       andrew    263:         </pre>
                    264:         <p>Andrew Fresh &lt;<a href='mailto:andrew@mad-techies.org'>andrew@mad-techies.org</a>&gt;</p>
1.4     ! andrew    265:         <p><small>$RedRiver: index.html,v 1.3 2006/05/04 01:39:16 andrew Exp $</small></p>
1.1       andrew    266:     </body>
                    267: </html>

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