Check_nrpe

Hi! I’m spanish,and i have a question.
I install my nrpe with this:

tar xzf nrpe-2.12.tar.gz
cd nrpe-2.12

sudo apt-get install openssl libssl-dev

sudo ./configure --enable-commands-args
sudo make all
sudo make install-plugin
sudo make install-daemon
sudo make install-daemon-config

make install-xinetd

/etc/xinetd.d/nrpe

default: on

description: NRPE (Nagios Remote Plugin Executor)

service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -n -c /usr/local/nagios/etc/nrpe.cfg -i
log_on_failure += USERID
disable = no
only_from = 127.0.0.1
}

nrpe 5666/tcp # NRPE

sudo /etc/init.d/xinetd restart
sudo /etc/init.d/nagios restart

Now i make this:
this with no arguments
command[check_lm_sensors]=/usr/local/nagios/libexec/check_lm_sensors -c temp1=20,30

and the result is -->root@ubuntu:/usr/local/nagios/libexec# ./check_nrpe -n -H localhost -c check_lm_sensors
LM_SENSORS UNKNOWN - Error while executing /usr/sbin/hddtemp -n /dev/sda:

And the syslog say this:
May 24 18:55:21 ubuntu nrpe[3560]: Host is asking for command ‘check_lm_sensors’ to be run…
May 24 18:55:21 ubuntu nrpe[3560]: Running command: /usr/local/nagios/libexec/check_lm_sensors -c temp1=20,30
May 24 18:55:21 ubuntu nrpe[3560]: Command completed with return code 3 and output: LM_SENSORS UNKNOWN - Error while executing /usr/sbin/hddtemp -n /dev/sda:

With arguments and dont_blame_nrpe=1
command[check_lm_sensors]=/usr/local/nagios/libexec/check_lm_sensors -c $ARG1$=$ARG2$,$ARG3$

root@ubuntu:/usr/local/nagios/libexec# ./check_nrpe -n -H localhost -c check_lm_sensors ‘Core 0’=20,30
LM_SENSORS UNKNOWN - Error while executing /usr/sbin/hddtemp -n /dev/sda:

syslog:

May 24 19:25:39 ubuntu nrpe[11268]: INFO: SSL/TLS NOT initialized. Network encryption DISABLED.
May 24 19:25:39 ubuntu nrpe[11268]: Handling the connection…
May 24 19:25:39 ubuntu nrpe[11268]: Host is asking for command ‘check_lm_sensors’ to be run…
May 24 19:25:39 ubuntu nrpe[11268]: Running command: /usr/local/nagios/libexec/check_lm_sensors -c =,
May 24 19:25:39 ubuntu nrpe[11268]: Command completed with return code 3 and output: LM_SENSORS UNKNOWN - Error while executing /usr/sbin/hddtemp -n /dev/sda:
May 24 19:25:39 ubuntu nrpe[11268]: Return Code: 3, Output: LM_SENSORS UNKNOWN - Error while executing /usr/sbin/hddtemp -n /dev/sda:

i see in this line the arguments aren’t Running command: /usr/local/nagios/libexec/check_lm_sensors -c =,

Anyone have a solution please??Thanks!!!

The others commands are correct.example:
root@ubuntu:/usr/local/nagios/libexec# ./check_nrpe -n -H localhost -c check_users
USERS OK - 3 users currently logged in |users=3;5;10;0

i found that i need -a to argument and there this is to output

May 24 21:40:18 ubuntu nrpe[13161]: Handling the connection…
May 24 21:40:18 ubuntu nrpe[13161]: Error: Request contained command arguments!
May 24 21:40:18 ubuntu nrpe[13161]: Client request was invalid, bailing out…

root@ubuntu:/usr/local/nagios/libexec# ./check_nrpe -n -H localhost -c check_users -a 5 10
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
root@ubuntu:/usr/local/nagios/libexec# ./check_nrpe -n -H localhost -c check_lm_sensors -a ‘Core 0’=20,30
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

to me it loks like a problem with LM_sensors not with nrpe…

Correctly,i erase one part of the script that call hddtemp and then it’s work!thanks

Hi
I am working on nagios since last 2 months.
I have configured it properly for monitoring remote linux machines.
When i am checking some services on remote machine,it is saying " CRITICAL - Socket timeout after 10 seconds" .
I don’t know why this error occurs,please tell me the solution for this.
thanks for the help…

[quote=“ravis”]Hi
I am working on nagios since last 2 months.
I have configured it properly for monitoring remote linux machines.
When i am checking some services on remote machine,it is saying " CRITICAL - Socket timeout after 10 seconds" .
I don’t know why this error occurs,please tell me the solution for this.
thanks for the help…[/quote]

i have the same too, when i try to check via console i get "socket timed out after 10seconds"
any help please