Page 1 of 1
Monitoring Centos 7
Posted: Fri Nov 27, 2015 5:08 pm
by spiderpig
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?
Re: Monitoring Centos 7
Posted: Sun Nov 29, 2015 5:53 pm
by spiderpig
anyone?
Re: Monitoring Centos 7
Posted: Sun Nov 29, 2015 10:23 pm
by Box293
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:
Code: Select all
service xinetd status
or
/bin/systemctl status xinetd.service
Re: Monitoring Centos 7
Posted: Wed Dec 02, 2015 12:03 pm
by MikeH
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?
Re: Monitoring Centos 7
Posted: Wed Dec 02, 2015 12:29 pm
by hsmith
How did you install NRPE?
Re: Monitoring Centos 7
Posted: Wed Dec 02, 2015 12:43 pm
by MikeH
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?
Re: Monitoring Centos 7
Posted: Wed Dec 02, 2015 4:19 pm
by hsmith
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.
Re: Monitoring Centos 7
Posted: Thu Dec 03, 2015 6:49 am
by MikeH
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.
Re: Monitoring Centos 7
Posted: Thu Dec 03, 2015 10:40 am
by bwallace
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.