em01 temperature sensor (no output)


I’ve picked up an em01 temperature sensor as seen on the nagios website. It works great but I seem to be having a problem with getting it’s ouput into nagios. I’ve never had a problem like this before with all the services and commands I’ve configured for nagios.

The host config is:

define host {
host_name Temp_Sensor
alias Temperature Sensor
use generic-host
check_command check-host-alive
checks_enabled 1

The service config is:

define service {
host_name Temp_Sensor
service_description Temperature_Service
check_command check_temperature!18,28!10,29
use generic-service
contact_groups helpline

The command is:

define command {
command_name check_temperature
command_line $USER1$/check_em01 -H $HOSTADDRESS$ -T TEMP --tw $ARG1$ --tc $ARG2$

In my resources config $USER1$ = /usr/local/nagios/libexec and that is where the perl script check_em01 lives

The output works from the command line with output like the following:

OK: temp: 21.4 C

The problem is that when nagios runs the check all I ever get is “(no output)”.

Anyone have any ideas that might turn a light on in my head? :slight_smile:
Edited ]


permissions on the check_em01 are not correct perhaps.


execute perms for all and the nagios user is able to execute the plugin at the prompt.


I’ve sort of figured out the problem with this. The embedded perl interpreter in nagios 1.2 doesn’t seem to like the threshold values being separated by a comma. I’ve changed it in the script to be separated by a / instead and this seems to have worked except my threshold values for temperature don’t seem to be seen at all. Every temperature is critical. Oddly enough, the humidity sensor seems to be working fine after the change.