Code: Select all
nagios@localhost:/usr/local/nagios/libexec$ sudo su nagios
[sudo] password for nagios:
Sorry, user nagios is not allowed to execute '/bin/su nagios' as root on localhost.
Code: Select all
nagios@localhost:/usr/local/nagios/libexec$ sudo su nagios
[sudo] password for nagios:
Sorry, user nagios is not allowed to execute '/bin/su nagios' as root on localhost.
Code: Select all
nagios@localhost:/usr/local/nagios/libexec$ ./check_uptime
Uptime OK: 15 day(s) 21 hour(s) 54 minute(s) | uptime=22914.000000;;;
A couple of posts ago:In the Linux host:
In my "nrpe.cfg" I added:Code: Select all
command[check_uptime]=/usr/local/nagios/libexec/check_uptime -w 5 -c 10
Have you restarted xinetd on the remote host since making these changes?xerez wrote:nrpe.cfg in Nagios:Code: Select all
command[check_uptime]=/usr/local/nagios/libexec/check_uptime
Code: Select all
service xinetd restart
Code: Select all
command[check_uptime]=/usr/local/nagios/libexec/check_uptime -w 5 -c 10
Code: Select all
command[check_uptime]=/usr/local/nagios/libexec/check_uptime -w 5 -c 10
On the nagios server nrpe.cfg is irrelevant. You do not need to modify it for any reason.xerez wrote:nrpe.cfg on Nagios:
Code: Select all
command[check_uptime]=/usr/local/nagios/libexec/check_uptime -w 5 -c 10
Code: Select all
# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to the
# syslog facility.
# Values: 0=debugging off, 1=debugging on
debug=1
Not if this:xerez wrote:However, I don't have installed xinetd in the Linux host. It is necessary?
is accurate. Let's verify - when you did this you used the the remote Linux server's IP in <host ip> right?xerez wrote:Code: Select all
nagios@localhost:~$ /usr/local/nagios/libexec/check_nrpe -H <host ip> NRPE v2.13
Code: Select all
/etc/init.d/nrpe restart
Code: Select all
ps -ef | grep nrpe
Code: Select all
nagios@localhost:~$ /usr/local/nagios/libexec/check_nrpe -H <host ip>
NRPE v2.13
Code: Select all
apt-get install nagios-nrpe-server nagios-plugins-basic nagios-plugins
Code: Select all
usuario@linux:/etc/nagios$ /etc/init.d/nagios-nrpe-server restart
[....] Stopping nagios-nrpe: nagios-nrpestart-stop-daemon: warning: failed to kill 8794: No such process
. ok
[ ok ] Starting nagios-nrpe: nagios-nrpe.
Code: Select all
usuario@linux:/etc/nagios$ ps -ef | grep nrpe
nagios 15067 1 0 may08 ? 00:01:15 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
usuario 16261 15868 0 09:32 pts/0 00:00:00 grep nrpe
Code: Select all
usuario@linux:~$ cat /etc/nagios/nrpe.cfg
....
# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to the
# syslog facility.
# Values: 0=debugging off, 1=debugging on
debug=1
....
Code: Select all
usuario@linux:~$ su -c "/etc/init.d/nagios-nrpe-server restart"
Code: Select all
nagios@localhost:/usr/local/nagios/libexec$ check_nrpe -H <host ip> -c check_uptime
NRPE: Unable to read output
Code: Select all
usuario@linux:~$ su -c "tail /var/log/messages"
Contraseña:
May 18 07:48:43 debian mpt-statusd: detected non-optimal RAID status
May 18 07:58:43 debian mpt-statusd: detected non-optimal RAID status
May 18 08:08:43 debian mpt-statusd: detected non-optimal RAID status
May 18 08:18:53 debian mpt-statusd: detected non-optimal RAID status
May 18 08:28:53 debian mpt-statusd: detected non-optimal RAID status
May 18 08:38:53 debian mpt-statusd: detected non-optimal RAID status
May 18 08:48:53 debian mpt-statusd: detected non-optimal RAID status
May 18 08:58:53 debian mpt-statusd: detected non-optimal RAID status
May 18 09:08:53 debian mpt-statusd: detected non-optimal RAID status
May 18 09:18:53 debian mpt-statusd: detected non-optimal RAID status
Code: Select all
May 18 05:29:30 localhost nrpe[10348]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
May 18 05:29:30 localhost nrpe[10349]: Starting up daemon