[Pkg-nagios-devel] Bug#615133: nagios-plugins: check_sensors does not trap 'FAULT' status

Jonathan Wiltshire jmw at debian.org
Fri Feb 25 23:07:22 UTC 2011

Package: nagios-plugins
Version: 1.4.15-3
Severity: normal
Tags: patch


The nagios plugin check_sensors does not detect the 'FAULT' status:

beast:~# sensors
Adapter: ISA adapter
fan1:       3924 RPM  (min =    0 RPM)
fan3:          FAULT  (min =    0 RPM)
fan4:          FAULT  (min =    0 RPM)
fan8:       3813 RPM  (min =    0 RPM)

beast:~# /usr/lib/nagios/plugins/check_sensors 
sensor ok

The attached patch causes check_sensors to return a critical status if faulty
sensors are detected.

-- System Information:
Debian Release: wheezy/sid
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages nagios-plugins depends on:
pn  nagios-plugins-basic          <none>     (no description available)
pn  nagios-plugins-standard       <none>     (no description available)

nagios-plugins recommends no packages.

Versions of packages nagios-plugins suggests:
pn  nagios3                       <none>     (no description available)
-------------- next part --------------
Description: check for lmsensors 'FAULT' status as well as 'ALARM'
Author: Jonathan Wiltshire <jmw at debian.org>
Last-Update: 2011-02-25

--- nagios-plugins-1.4.15.orig/plugins-scripts/check_sensors.sh
+++ nagios-plugins-1.4.15/plugins-scripts/check_sensors.sh
@@ -57,6 +57,9 @@
 		if echo ${sensordata} | egrep ALARM > /dev/null; then
 			echo SENSOR CRITICAL - Sensor alarm detected!
 			exit 2
+		elif echo ${sensordata} | egrep FAULT > /dev/null; then
+			echo SENSOR CRITICAL - Sensor reported fault
+			exit 1
 			echo sensor ok
 			exit 0

More information about the Pkg-nagios-devel mailing list