CentOS 7

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.
Locked
metcalp
Posts: 1
Joined: Sun Jul 06, 2014 11:08 pm

CentOS 7

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CentOS 7

Post 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!
paslin
Posts: 3
Joined: Tue Jul 15, 2014 4:23 pm

Re: CentOS 7

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: CentOS 7

Post 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.
paslin
Posts: 3
Joined: Tue Jul 15, 2014 4:23 pm

Re: CentOS 7

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: CentOS 7

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
paslin
Posts: 3
Joined: Tue Jul 15, 2014 4:23 pm

Re: CentOS 7

Post 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!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: CentOS 7

Post 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/
Former Nagios employee
Locked