Hello,
I'm working on building a new Nagios box running on CentOS7 (coming off of CentOS5). I've got the new box most of the way up. But can't seem to get the Linux boxes to communicate with the new box. The old box works just fine. I backed up and then restored from the old box so the setting should all be the same.
There are a couple of oddities that are making things worse for me. First, it looks like the person who built the image we use for deploying Linux servers didn't install NSClient++ in the default directories. (For example, the nrpe.cfg file is in /usr/local/nagios/etc.) Second, the nrpe.cfg file only has 127.0.0.1 listed under allowed_hosts. Third, the nrpe service is not running or even pretending to. When I run "/sbin/service nrpe status" I get back "service: no such service nrpe".
I am completely flummoxed. How can one instance of Nagios work just fine and the other not work at all?
Any suggestions on where I can start looking?
Thanks!
Monitoring Linux without NSClient++ running
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Monitoring Linux without NSClient++ running
Is there a reason you are using NSClient on Linux? I've known it was possible, but never actually heard of someone doing that.'
I suspect you missed page 6 of https://assets.nagios.com/downloads/nag ... ios-XI.pdf
What's the output of uname -a on both systems?
I suspect you missed page 6 of https://assets.nagios.com/downloads/nag ... ios-XI.pdf
What's the output of uname -a on both systems?
-
SteveBeauchemin
- Posts: 524
- Joined: Mon Oct 14, 2013 7:19 pm
Re: Monitoring Linux without NSClient++ running
Look in /etc/xinetd.d/ for the nrpe file. If you find it there then nrpe is running as part of xinetd and not as a stand alone daemon.
If it is there, then you need to modify the only_from line and have the Nagios Server IP listed. If you modify the file, you should restart the xinetd.
My nrpe.cfg file is in /usr/local/nagios/etc too.
Another thing that could prevent IP communication is the firewall. If you turn it off, and communication works, then you'll need to either leave it off, or configure it properly. Try running and see if that makes a difference.
When I moved from Red Hat 6 to 7, I had to learn pretty fast about systemctl. If you need to find the systemctl configuration files, look in /usr/lib/systemd/system. If you plan to change a file, copy it from there to /etc/systemd/system and edit/change it in the /etc location. Whenever you do change one of those files, you have to tell the OS that you made a change. Do that by running
On Linux we run nrpe, on the MS systems NSClient++ is the agent. I'm sure you actually meant nrpe right?
Get yourself ready to learn a lot.
Good Luck.
Steve B
If it is there, then you need to modify the only_from line and have the Nagios Server IP listed. If you modify the file, you should restart the xinetd.
Code: Select all
systemctl restart xinetdAnother thing that could prevent IP communication is the firewall. If you turn it off, and communication works, then you'll need to either leave it off, or configure it properly. Try running
Code: Select all
systemctl stop firewalldWhen I moved from Red Hat 6 to 7, I had to learn pretty fast about systemctl. If you need to find the systemctl configuration files, look in /usr/lib/systemd/system. If you plan to change a file, copy it from there to /etc/systemd/system and edit/change it in the /etc location. Whenever you do change one of those files, you have to tell the OS that you made a change. Do that by running
Code: Select all
systemctl daemon-reloadGet yourself ready to learn a lot.
Good Luck.
Steve B
Last edited by SteveBeauchemin on Wed May 24, 2017 4:07 pm, edited 1 time in total.
XI 5.7.3 / Core 4.4.6 / NagVis 1.9.8 / LiveStatus 1.5.0p11 / RRDCached 1.7.0 / Redis 3.2.8 /
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
SNMPTT / Gearman 0.33-7 / Mod_Gearman 3.0.7 / NLS 2.0.8 / NNA 2.3.1 /
NSClient 0.5.0 / NRPE Solaris 3.2.1 Linux 3.2.1 HPUX 3.2.1
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Monitoring Linux without NSClient++ running
Steve,SteveBeauchemin wrote:Look in /etc/xinetd.d/ for the nrpe file. If you find it there then nrpe is running as part of xinetd and not as a stand alone daemon.
If it is there, then you need to modify the only_from line and have the Nagios Server IP listed. If you modify the file, you should restart the xinetd.Code: Select all
systemctl restart xinetd
Thanks! This cleared it up! (Although, I had to bounce the Linux server in order to get it to restart the xinetd service. Not sure why just yet.)
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Monitoring Linux without NSClient++ running
Hard to say without logs, but did you use killall? I realize that's not restarting in the general sense of the word, but it might have kept you from rebooting the entire system.SavaSC wrote:(Although, I had to bounce the Linux server in order to get it to restart the xinetd service. Not sure why just yet.)
Re: Monitoring Linux without NSClient++ running
Bingo! That's what I needed. Thanks, again, Steve!dwhitfield wrote:Hard to say without logs, but did you use killall? I realize that's not restarting in the general sense of the word, but it might have kept you from rebooting the entire system.SavaSC wrote:(Although, I had to bounce the Linux server in order to get it to restart the xinetd service. Not sure why just yet.)
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Monitoring Linux without NSClient++ running
It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!
Re: Monitoring Linux without NSClient++ running
Yes, I have what I need.
Thanks so much for y'all's help!
Thanks so much for y'all's help!