Nagios stop working

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.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios stop working

Post by dwhitfield »

Others have had success eliminating this error re-compiling the following items.

Code: Select all

make install-init
systemctl enable nagios.service
systemctl enable httpd.service

make install-commandmode
make install-config
make install-webconf
It looks like you still have the vestiges of the old install, so please make sure you are re-compiling using the 4.2.1.
wice22
Posts: 15
Joined: Mon Nov 07, 2016 11:27 am

Re: Nagios stop working

Post by wice22 »

Don't quote me but , it seems u did compile Nagios by your self
and then installed NRPE using YUM
The problem here is that Yum installs bit older versions of everything and NRPE from repo comes configured for totally different directories like : in case of compilation /usr/local/nagios/etc/ vs /etc/nagios/ in case of YUM installation.
I believe best choice would be to roll back last install, if NRPE was installed using yum just
yum remove nrpe
get older version of nrpe (ask lads here which one is compatible with your version of nagios the best, and recompile it)
rbizzell39
Posts: 112
Joined: Thu Dec 17, 2015 1:24 pm

Re: Nagios stop working

Post by rbizzell39 »

I compiled NRPE after I had Nagios up and running
rbizzell39
Posts: 112
Joined: Thu Dec 17, 2015 1:24 pm

Re: Nagios stop working

Post by rbizzell39 »

What directory do I have to been in to issue these commands
ake install-init
systemctl enable nagios.service
systemctl enable httpd.service

make install-commandmode
make install-config
make install-webconf
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios stop working

Post by dwhitfield »

Well, the instructions at https://support.nagios.com/kb/article.php?id=96 say /tmp/nagioscore-nagios-4.2.1/, but the real answer is wherever you unpacked the 4.2.1 tarball.
rbizzell39
Posts: 112
Joined: Thu Dec 17, 2015 1:24 pm

Re: Nagios stop working

Post by rbizzell39 »

okay thanks! I will try that
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios stop working

Post by dwhitfield »

Awesome. Also, FYI that unless you set something else up, /tmp is ok to use in CentOS. Debian and at least some derivs automatically flush that, but CentOS does not.
rbizzell39
Posts: 112
Joined: Thu Dec 17, 2015 1:24 pm

Re: Nagios stop working

Post by rbizzell39 »

Thanks for all your help
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios stop working

Post by dwhitfield »

No problem, that's what we're here for!
rbizzell39
Posts: 112
Joined: Thu Dec 17, 2015 1:24 pm

Re: Nagios stop working

Post by rbizzell39 »

systemctl start nagios.service
Job for nagios.service failed because a configured resource limit was exceeded. See "systemctl status nagios.service" and "journalctl -xe" for details.
[root@splab-nagios tmp]# systemctl status nagios.service
● nagios.service - Nagios Network Monitoring
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
Active: failed (Result: resources) since Tue 2016-11-15 14:45:52 EST; 14s ago
Docs: https://www.nagios.org/documentation/
Process: 27588 ExecStart=/usr/sbin/nagios -d /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)
Process: 27586 ExecStartPre=/usr/sbin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=0/SUCCESS)

Nov 15 14:45:52 splab-nagios systemd[1]: Starting Nagios Network Monitoring...
Nov 15 14:45:52 splab-nagios systemd[1]: PID file /var/run/nagios/nagios.pid not readable (yet?) after start.
Nov 15 14:45:52 splab-nagios systemd[1]: nagios.service never wrote its PID file. Failing.
Nov 15 14:45:52 splab-nagios systemd[1]: Failed to start Nagios Network Monitoring.
Nov 15 14:45:52 splab-nagios systemd[1]: Unit nagios.service entered failed state.
Nov 15 14:45:52 splab-nagios systemd[1]: nagios.service failed.
This is what happened after I downloaded and recompiled nagios 4.2.2
Locked