Page 3 of 4
Re: Nagios stop working
Posted: Mon Nov 14, 2016 4:30 pm
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.
Re: Nagios stop working
Posted: Mon Nov 14, 2016 6:18 pm
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)
Re: Nagios stop working
Posted: Tue Nov 15, 2016 12:24 am
by rbizzell39
I compiled NRPE after I had Nagios up and running
Re: Nagios stop working
Posted: Tue Nov 15, 2016 9:23 am
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
Re: Nagios stop working
Posted: Tue Nov 15, 2016 10:49 am
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.
Re: Nagios stop working
Posted: Tue Nov 15, 2016 11:05 am
by rbizzell39
okay thanks! I will try that
Re: Nagios stop working
Posted: Tue Nov 15, 2016 11:25 am
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.
Re: Nagios stop working
Posted: Tue Nov 15, 2016 11:29 am
by rbizzell39
Thanks for all your help
Re: Nagios stop working
Posted: Tue Nov 15, 2016 11:31 am
by dwhitfield
No problem, that's what we're here for!
Re: Nagios stop working
Posted: Tue Nov 15, 2016 2:46 pm
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