Page 2 of 3
Re: Cannot write to pidfile
Posted: Tue Jul 25, 2017 11:49 am
by sirampadu
/etc/xinetd.d/nrpe does not exsist on the Nagios server
Re: Cannot write to pidfile
Posted: Tue Jul 25, 2017 11:53 am
by sirampadu
cat /etc/xinetd.d/nrpe
# default: off
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
disable = yes
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
only_from = 127.0.0.1,10.41.12.30
log_on_success =
Re: Cannot write to pidfile
Posted: Tue Jul 25, 2017 12:01 pm
by bolson
Change disable = yes to disable = no
The two ip addresses in the only_from directive should be separated by a space rather than a comma.
Save the changes, restart xinetd, and:
Re: Cannot write to pidfile
Posted: Tue Jul 25, 2017 3:34 pm
by sirampadu
bolson wrote:NRPE is not running. Please copy and paste the contents of /etc/xinetd.d/nrpe
Thank you.
I just notice the /etc/xinetd.d/nrpe does not exist on the Nagios monitoring server. The one i poster was from the client. sorry about the confusion.
Nagios server ip (10.41.12.30):
cat /etc/xinetd.d/nrpe
cat: /etc/xinetd.d/nrpe: No such file or directory
Client:
cat /etc/xinetd.d/nrpe
# default: off
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
disable = no
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
only_from = 127.0.0.1 10.41.12.30
log_on_success =
}
Re: Cannot write to pidfile
Posted: Tue Jul 25, 2017 3:57 pm
by bolson
On the host to be monitored, run:
Code: Select all
service xinetd restart
telnet localhost 5666
What do you see?
Re: Cannot write to pidfile
Posted: Tue Jul 25, 2017 4:18 pm
by sirampadu
bolson wrote:On the host to be monitored, run:
Code: Select all
service xinetd restart
telnet localhost 5666
What do you see?
service xinetd restart
Redirecting to /bin/systemctl restart xinetd.service
telnet localhost 5666
-bash: telnet: command not found
Re: Cannot write to pidfile
Posted: Tue Jul 25, 2017 4:20 pm
by bolson
Code: Select all
yum -y install telnet
telnet localhost 5666
Re: Cannot write to pidfile
Posted: Tue Jul 25, 2017 4:31 pm
by sirampadu
bolson wrote:Code: Select all
yum -y install telnet
telnet localhost 5666
telnet localhost 5666
Trying ::1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
Re: Cannot write to pidfile
Posted: Tue Jul 25, 2017 4:51 pm
by bolson
At this point, the best course of action would be for you to go back through the installation being sure to complete all steps and let us know tomorrow if nrpe installs and runs correctly. Thank you.
Re: Cannot write to pidfile
Posted: Wed Jul 26, 2017 9:07 am
by sirampadu
bolson wrote:At this point, the best course of action would be for you to go back through the installation being sure to complete all steps and let us know tomorrow if nrpe installs and runs correctly. Thank you.
I have about 50 remote linux (rhel7) host to configure. Which configuration is more efficient standalone nrpe or with xinetd?