Cannot write to pidfile

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
sirampadu
Posts: 14
Joined: Tue Jul 25, 2017 9:27 am

Re: Cannot write to pidfile

Post by sirampadu »

/etc/xinetd.d/nrpe does not exsist on the Nagios server
sirampadu
Posts: 14
Joined: Tue Jul 25, 2017 9:27 am

Re: Cannot write to pidfile

Post 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 =
bolson

Re: Cannot write to pidfile

Post 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:

Code: Select all

telnet localhost 5666
sirampadu
Posts: 14
Joined: Tue Jul 25, 2017 9:27 am

Re: Cannot write to pidfile

Post 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 =
}
bolson

Re: Cannot write to pidfile

Post by bolson »

On the host to be monitored, run:

Code: Select all

service xinetd restart
telnet localhost 5666
What do you see?
sirampadu
Posts: 14
Joined: Tue Jul 25, 2017 9:27 am

Re: Cannot write to pidfile

Post 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
bolson

Re: Cannot write to pidfile

Post by bolson »

Code: Select all

yum -y install telnet
telnet localhost 5666
sirampadu
Posts: 14
Joined: Tue Jul 25, 2017 9:27 am

Re: Cannot write to pidfile

Post 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.
bolson

Re: Cannot write to pidfile

Post 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.
sirampadu
Posts: 14
Joined: Tue Jul 25, 2017 9:27 am

Re: Cannot write to pidfile

Post 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?
Locked