Page 1 of 1

CentOS 7

Posted: Thu Jul 10, 2014 7:35 pm
by metcalp
Hi,

Anyone have any experience setting up and running Nagios Core on CentOS 7 yet ? I'm currently running CentOS 6 and imagine the process will be *fairly* similar though perhaps not identical.

Cheers

Re: CentOS 7

Posted: Fri Jul 11, 2014 9:38 am
by slansing
Should be identical, I think the only major changes would be packaging bumps, I believe we have a test XI server running on it right now and it didn't give us much trouble. We'd be interested to hear how it goes for you if you set up a test system on it!

Re: CentOS 7

Posted: Wed Jul 16, 2014 8:45 am
by paslin
I've been working on installing Nagios Core 4 on CentOS7. I was able to get Nagios Core working, the issue I'm at right now is getting the NRPE service to install as a daemon. I've followed the instructions and I get the check_nrpe file, but nrpe isn't installed as a service. My guess is there is an issue with installing via systemctl. I've done a bunch of googling to see how to install nrpe via systemctl, but I've come up short.

Re: CentOS 7

Posted: Wed Jul 16, 2014 9:20 am
by slansing
How are you installing NRPE? RPM? Source? What guide are you following, we can take a look and see exactly what you are trying to do to better help you.

Re: CentOS 7

Posted: Wed Jul 16, 2014 10:01 am
by paslin
slansing wrote:How are you installing NRPE? RPM? Source? What guide are you following, we can take a look and see exactly what you are trying to do to better help you.

I using source following the directions in the nagios NRPE documentation
http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf

I was installing from source, following the directions from this documentation, section D. I followed step i, substituting the version in documentation with NRPE 2.15 found here http://sourceforge.net/projects/nagios/ ... nrpe-2.15/

At step ii, I tried to test check_nrpe by connecting to local host and I get a communication error. There are a few troubleshooting steps in that step, one which I wasn't sure if it applied to CentOS7 considering they have made a major change from init to systemd, and I'm not sure if I should be installing and using xinetd. "-Make sure that the NRPE daemon is installed properly under xinetd." It's because I'm not using xinetd, but systemctl to manage services. Maybe this is the wrong approach and I must use xinetd?

Re: CentOS 7

Posted: Wed Jul 16, 2014 7:59 pm
by abrist
xinetd is not required. You should be able to test the nrpe daemon by just passing it "-d" and "-c <path to nagios.cfg>:

Code: Select all

/path/to/nrpe -d -c /path/to/nagios.cfg

Re: CentOS 7

Posted: Thu Jul 17, 2014 8:31 am
by paslin
abrist wrote:xinetd is not required. You should be able to test the nrpe daemon by just passing it "-d" and "-c <path to nagios.cfg>:

Code: Select all

/path/to/nrpe -d -c /path/to/nagios.cfg
Once I did that I was able to successfully test the check_nrpe service, though I needed to make one change. I did "/usr/local/nagios/bin/nrpe -d -c /usr/local/nagios/etc/nrpe.cfg", not nagios.cfg as you suggested. Thanks!

However, I still don't see the service registered in systemd/systemctl and once I reboot the daemon didn't restart until I ran the above command again. Please bare with me, I'm still learning linux. I appreciate your help!

Re: CentOS 7

Posted: Thu Jul 17, 2014 5:22 pm
by tmcdonald
You can probably get by with what is called the "rc.local" file - basically it runs all commands in it upon startup:

http://drewsymo.com/2013/11/run-a-scrip ... s-startup/