Hi,
I'm trying to monitor centos 7.1 server, I installed NRPE plugin. But when i try to start the server it fails with the following error.
service nrpe start
Nov 27 21:33:58 hostnamel systemd[1]: Starting SYSV: Nagios NRPE daemon...
Nov 27 21:33:58 hostnamel nrpe[7309]: Starting Nagios NRPE daemon (nrpe):
Nov 27 21:33:58 hostname systemd[1]: PID file /var/run/nrpe not readable (yet?) after start.
Nov 27 21:38:58hostname systemd[1]: nrpe.service operation timed out. Terminating.
Nov 27 21:38:58 hostname systemd[1]: Failed to start SYSV: Nagios NRPE daemon.
Nov 27 21:38:58 hostname systemd[1]: Unit nrpe.service entered failed state.
any ideas how I can fix this?
Monitoring Centos 7
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Monitoring Centos 7
Sorry about that, it was Thanksgiving holidays in the USA last Thursday/Friday and the support office was closed.
How did you go about installing NRPE on CentOS 7? What guide did you follow?
If you follow this guide, it will use xinetd to run nrpe and it should work OK.
http://sites.box293.com/nagios/guides/n ... 7-0---nrpe
Then you should be able to use:
How did you go about installing NRPE on CentOS 7? What guide did you follow?
If you follow this guide, it will use xinetd to run nrpe and it should work OK.
http://sites.box293.com/nagios/guides/n ... 7-0---nrpe
Then you should be able to use:
Code: Select all
service xinetd status
or
/bin/systemctl status xinetd.service
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Monitoring Centos 7
I have the same problem, there doesn't appear to be an attempt by nrpe to create the PID file.
Dec 2 16:48:10 ng1-mps1 systemd: Starting SYSV: Nagios NRPE daemon...
Dec 2 16:48:10 ng1-mps1 nrpe[9427]: Starting up daemon
Dec 2 16:48:10 ng1-mps1 nrpe: Starting Nagios NRPE daemon (nrpe): [ OK ]
Dec 2 16:48:10 ng1-mps1 nrpe[9427]: Listening for connections on port 5666
Dec 2 16:48:10 ng1-mps1 nrpe[9427]: Allowing connections from: 127.0.0.1,172.27.10.20
Dec 2 16:48:10 ng1-mps1 systemd: PID file /var/run/nrpe not readable (yet?) after start.
Dec 2 16:48:21 ng1-mps1 nrpe[9427]: Caught SIGTERM - shutting down...
Dec 2 16:48:21 ng1-mps1 nrpe[9427]: Cannot remove pidfile '/var/run/nrpe.pid' - check your privileges.
Dec 2 16:48:21 ng1-mps1 nrpe[9427]: Daemon shutdown
Dec 2 16:48:21 ng1-mps1 systemd: nrpe.service never wrote its PID file. Failing.
Dec 2 16:48:21 ng1-mps1 systemd: Failed to start SYSV: Nagios NRPE daemon.
Dec 2 16:48:21 ng1-mps1 systemd: Unit nrpe.service entered failed state.
In /etc/nagios/nrpe.cfg I have:
pid_file=/var/run/nrpe.pid
I can see the process is running as:
nrpe -c /etc/nagios/nrpe.cfg -d
but no pid file.
I have been using Centos 6.6 without issues but this is my first attempt with Centos 7.1
Any ideas?
Dec 2 16:48:10 ng1-mps1 systemd: Starting SYSV: Nagios NRPE daemon...
Dec 2 16:48:10 ng1-mps1 nrpe[9427]: Starting up daemon
Dec 2 16:48:10 ng1-mps1 nrpe: Starting Nagios NRPE daemon (nrpe): [ OK ]
Dec 2 16:48:10 ng1-mps1 nrpe[9427]: Listening for connections on port 5666
Dec 2 16:48:10 ng1-mps1 nrpe[9427]: Allowing connections from: 127.0.0.1,172.27.10.20
Dec 2 16:48:10 ng1-mps1 systemd: PID file /var/run/nrpe not readable (yet?) after start.
Dec 2 16:48:21 ng1-mps1 nrpe[9427]: Caught SIGTERM - shutting down...
Dec 2 16:48:21 ng1-mps1 nrpe[9427]: Cannot remove pidfile '/var/run/nrpe.pid' - check your privileges.
Dec 2 16:48:21 ng1-mps1 nrpe[9427]: Daemon shutdown
Dec 2 16:48:21 ng1-mps1 systemd: nrpe.service never wrote its PID file. Failing.
Dec 2 16:48:21 ng1-mps1 systemd: Failed to start SYSV: Nagios NRPE daemon.
Dec 2 16:48:21 ng1-mps1 systemd: Unit nrpe.service entered failed state.
In /etc/nagios/nrpe.cfg I have:
pid_file=/var/run/nrpe.pid
I can see the process is running as:
nrpe -c /etc/nagios/nrpe.cfg -d
but no pid file.
I have been using Centos 6.6 without issues but this is my first attempt with Centos 7.1
Any ideas?
Re: Monitoring Centos 7
Just through a few commands (in a similar manner I'd previously done on Centos6.6):
# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
# rpm -Uvh http://pkgs.repoforge.org/rpmforge-rele ... x86_64.rpm
# yum install nagios-nrpe
Then edited the /etc/nagios/nrpe.cfg and added my nagios server as an allowed host:
allowed_hosts=127.0.0.1,172.27.10.20
Then
# chkconfig nrpe on
and
# service nrpe start
I'm not really familiar with Linux/CentOS so maybe I'm missing something obvious. Does /etc/xinetd.d/nrpe have to be used somehow now on Centos 7?
# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
# rpm -Uvh http://pkgs.repoforge.org/rpmforge-rele ... x86_64.rpm
# yum install nagios-nrpe
Then edited the /etc/nagios/nrpe.cfg and added my nagios server as an allowed host:
allowed_hosts=127.0.0.1,172.27.10.20
Then
# chkconfig nrpe on
and
# service nrpe start
I'm not really familiar with Linux/CentOS so maybe I'm missing something obvious. Does /etc/xinetd.d/nrpe have to be used somehow now on Centos 7?
Re: Monitoring Centos 7
It doesn't, but it's the install that we are the most familiar with. Is there a chance I can get you to reinstall NRPE following these steps? It does a very clean job of it.
Former Nagios Employee.
me.
me.
Re: Monitoring Centos 7
Many thanks, I've followed the document you referenced so that nrpe is running via xinetd and it works.
I guess I can use this approach rather than running nrpe as a service going forward on Centos 7.1.
I guess I can use this approach rather than running nrpe as a service going forward on Centos 7.1.
Re: Monitoring Centos 7
Glad we were able to help. We'll lock this thread now and feel free to open another should you require assistance with anything else.
Be sure to check out the Knowledgebase for helpful articles and solutions!