Page 1 of 1

Status OK but no reading [sensors]

Posted: Fri Jan 27, 2012 6:31 am
by przemek
Hello there.
It's my first post so please forgive me any mistakes that you will face here ;)

My problem is with a script that is checking temperatures on cpu,mtb through sensors.

Strangely enough when i run a script in terminal all seems to be working just fine but nagios is not giving readings on its website even if status is OK.
See attachements:

On some of the machines same script is working fine. Any ideas what can be wrong??

nrpe.cfg

Code: Select all

command[check_temp_cpu]=/usr/lib/nagios/plugins/check_sensors_temp --sensor 'CPU Temperature' -w 60 -c 95 -awk 3 -cut 1-3%
x.cfg

Code: Select all

define service{
        use                             nrpe-service
        host_name                       x
        normal_check_interval           1
        service_description             Temp - CPU
        check_command                   check_nrpe!check_temp_cpu
        notifications_enabled           1
        }
System: openSuSE
v: 12.1 11.4 11.3

Re: Status OK but no reading [sensors]

Posted: Mon Jan 30, 2012 11:00 am
by agriffin
When you test it from the command line are you running it as root? Nagios runs its plugins as the nagios user, so you should test using that user. You can do so like this:

Code: Select all

su nagios -c "/usr/lib/nagios/plugins/check_sensors_temp --sensor 'CPU Temperature' -w 60 -c 95 -awk 3 -cut 1-3%"
This is usually the problem in situations like this where running plugins from the command line yields different results than from Nagios.

Re: Status OK but no reading [sensors]

Posted: Fri Feb 03, 2012 4:54 am
by przemek
Indeed the is no reading running that command.

What should i do next to fix it?