Feature #5174
opennrpe: check_sensors doesnt work, missing lmsensors
0%
Description
[2.2.4-RELEASE][root@firewall]/usr/pbi/nrpe-amd64/libexec/nagios: ./check_sensors
SENSORS UNKNOWN - command not found (did you install lmsensors?)
The actual check itself is a shell script with the following critical section
*)
sensordata=`sensors 2>&1`
status=$?
if test ${status} -eq 127; then
text="SENSORS UNKNOWN - command not found (did you install lmsensors?)"
exit=$STATE_UNKNOWN
elif test ${status} -ne 0; then
text="WARNING - sensors returned state $status"
exit=$STATE_WARNING
elif echo ${sensordata} | egrep ALARM > /dev/null; then
text="SENSOR CRITICAL - Sensor alarm detected!"
exit=$STATE_CRITICAL
elif echo ${sensordata} | egrep FAULT > /dev/null \
&& test "$1" != "-i" -a "$1" != "--ignore-fault"; then
text="SENSOR UNKNOWN - Sensor reported fault"
exit=$STATE_UNKNOWN
else
text="SENSORS OK"
exit=$STATE_OK
fi
It doesnt seem solvable other than using bsdhwmon as an alternative
Updated by Kill Bill about 9 years ago
The only commands defined and used in the pfSense package are listed here: https://github.com/pfsense/pfsense-packages/blob/master/config/nrpe2/nrpe2.inc#L69 and below, ending with line 109. I cannot see what's the bug here, sorry.
Updated by dean hamstead about 9 years ago
There are dozens more available in the web interface via the "command" drop down, ostensibly everything thats in /usr/pbi/nrpe-amd64/libexec/nagios
So the bug is that check_sensors is listed and doesnt work.
Rather than just posting "this option doesnt work, why????" - I took some time to look at the code, identify the problem and then provide little bit of research around it.
Kill Bill wrote:
The only commands defined and used in the pfSense package are listed here: https://github.com/pfsense/pfsense-packages/blob/master/config/nrpe2/nrpe2.inc#L69 and below, ending with line 109. I cannot see what's the bug here, sorry.
Updated by Kill Bill about 9 years ago
Yeah, so... the dropdown lists everything that's in the script (see https://github.com/pfsense/pfsense-packages/blob/master/config/nrpe2/nrpe2.inc#L221). You can either
- file a bug with FreeBSD guys to get it removed from the script in the port
- or file a bug with upstream to make it portable
This is a wrong place to report problem with upstream code or FreeBSD port that have nothing to do with the pfSense package.
Updated by Kill Bill about 9 years ago
Someone kindly close this. The globbing is obviously there so that users can use their own scripts and have them configurable in the GUI. Could as well file identical bugs like "nrpe: check_oracle doesnt work, missing Oracle" or "nrpe: check_disk_smb doesnt work, missing Samba client", or "nrpe: check_ircd doesnt work, missing IRC server"... Ridiculous. If it bothers you, delete the stuff you don't have use for from disk.
Updated by dean hamstead about 9 years ago
Kill Bill wrote:
Someone kindly close this. The globbing is obviously there so that users can use their own scripts and have them configurable in the GUI. Could as well file identical bugs like "nrpe: check_oracle doesnt work, missing Oracle" or "nrpe: check_disk_smb doesnt work, missing Samba client", or "nrpe: check_ircd doesnt work, missing IRC server"... Ridiculous. If it bothers you, delete the stuff you don't have use for from disk.
check_oracle can talk to remote hosts, check_sensors runs commands on the local machine - so its obviously very different.
can you confirm that in pfsense, exposing functions that cannot work is not considered a bug?
Updated by Chris Buechler about 9 years ago
- Category set to NRPE
ought to be some way to get the dependencies corrected on the package (though if all those were there, it might be an unnecessarily heavy dependency list).
Updated by Kill Bill about 9 years ago
These are not dependencies in any way. There are bunch of plugins (scripts/binaries) to performs configurable checks IF you choose to perform them and IF they are relevant to the particular system. It would not be heavy, it would be absolutely ridiculous. If they are irrelevant for the particular system, just do NOT configure them. It's not IF those were there. They are there. Jabber, IRCD, Oracle checks... Samba, and tons more.
One would assume people who use Nagios to be able to use common sense... well, apparently not. Enough time wasted here. This "bug" can stay open for couple of years.