Sorry for the confusion - here is my setup: Physical server running CentOS is a remote machine to Nagios which is running on the Ubuntu. I've the NRPE agent installed on the CentOS. It does the SSH, load, root partition, ping and the other checks. One of the thing I also want to monitor is the core temperature of this physical machine and then there are other physical machines which I'd like to be monitored remotely by Nagios Core.
In this process I've the plugin in the /usr/local/nagios/libexec directory named as "Check_temp.pl" I've then installed the Lm-sensors been thorough their questionnaire and got the core temp output when I type in the command "sensors". Now that I see the output, I check if Nagios server would fetch the results for me automatically without me logging in to the physical machine to check the core temp all the time. This is where I get the "no sensors detected" message.
As far as the command which sensor goes, I've run the command on the Nagios and the physical machine. I get the same output of /bin/usr if I run as root. If i run it as Nagios usr on the Nagios server I obviously get /usr/bin/sensors.
Check_temp.pl No sensors found on Nagios
Re: Check_temp.pl No sensors found on Nagios
No, the plugin is not on the physical machine. It's on the Nagios server. Where do I import the plugin to the physical server?
Re: Check_temp.pl No sensors found on Nagios
Again - this plugin is meant to be run locally (on the machine with the sensor that you would like to monitor). You can download the plugin directly on the CentOS box, or copy it over from the Ubuntu machine using FileZilla (or a similar FTP transfer program) or from the command line (via scp).
You have to run the plugin locally on the CentOS box. Once you determine it runs successfully from the CLI, you can call the plugin via check-by-ssh from your Nagios server or use check_nrpe.
Example:
command in nrpe.cfg on the centos box
testing from the nagios server
You have to run the plugin locally on the CentOS box. Once you determine it runs successfully from the CLI, you can call the plugin via check-by-ssh from your Nagios server or use check_nrpe.
Example:
command in nrpe.cfg on the centos box
Code: Select all
command[check_sensor]=/usr/local/nagios/libexec/check_temp.pl -c 85 -w 75 -s 'Core .'
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <ip address of the centos server> -c check_sensor
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check_temp.pl No sensors found on Nagios
Thanks for your help! I've downloaded the perl script locally on the CentOS machine ran the command on Nagios server and it says the "NRPE: Unable to read the output"
Code: Select all
root@Nagios:~# /usr/local/nagios/libexec/check_nrpe -H 192.168.xx.xx -c check_sensor
NRPE: Unable to read output
Re: Check_temp.pl No sensors found on Nagios
You don't need to use check_nrpe when you are testing the plugin locally. Just run the plugin itself:
Note: Make sure that the path to sensors that is defined in the plugin matches the actual path, obtained by running "which sensors".
Code: Select all
/usr/local/nagios/libexec/check_temp.pl -c 85 -w 75 -s 'Core .'
Be sure to check out our Knowledgebase for helpful articles and solutions!