Nagios Core - Not Running

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
Morty79
Posts: 5
Joined: Fri Jun 16, 2017 11:48 am

Nagios Core - Not Running

Post by Morty79 »

Hi Folks,

First time poster here. I've been working on a Cacti/Nagios Core server for the last couple days. Cacti is running and graphing for the most part but Nagios has been causing me some issues.

I have tried a few different things to get it running but I have been unsuccesful thus far.

Here it goes.

When i bring up the Nagios page it asks me for the un and pw. Logging in with the nagiosadmin account works fine.
However, the page says NAGIOS CORE x Not Running
If i click on Tactical Overview I get 'Error: Could not read object configuration data!'

Im running
CentOS 7
Nagios Core 4.2.4
NET-SNMP 5.7.2
PHP 5.4.16
Apache 2.4.6

Test on Nagios Cofig shows this:
[root@nms logs]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.3.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-05-09
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Warning: Could not get passwd entry for 'nagios'
Warning: Could not set effective UID=-1


systmctl status shows:
[root@nms logs]# systemctl status nagios.service
● nagios.service - Nagios Network Monitoring
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2017-06-16 12:37:56 EDT; 24min ago
Docs: https://www.nagios.org/documentation/
Process: 3737 ExecStartPre=/usr/sbin/nagios -v /etc/nagios/nagios.cfg (code=exited, status=217/USER)

Jun 16 12:37:56 nms.cruickshank.local systemd[1]: Starting Nagios Network Monitoring...
Jun 16 12:37:56 nms.cruickshank.local systemd[1]: nagios.service: control process exited, code=exited status=217
Jun 16 12:37:56 nms.cruickshank.local systemd[1]: Failed to start Nagios Network Monitoring.
Jun 16 12:37:56 nms.cruickshank.local systemd[1]: Unit nagios.service entered failed state.
Jun 16 12:37:56 nms.cruickshank.local systemd[1]: nagios.service failed.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios Core - Not Running

Post by dwhitfield »

Is it possible you have two different versions of Core installed? You report 4.2.4 but the output reports 4.3.2. Could you send a screenshot of your screen?

What's the output of rpm -qa | grep nagios? Please put the output in a code block. The "Code" button is the fifth from the left on the post input screen (between Quote and List).
Morty79
Posts: 5
Joined: Fri Jun 16, 2017 11:48 am

Re: Nagios Core - Not Running

Post by Morty79 »

Is it possible I have 2 versions...Yes. I tried using an online guide first. It didnt go so well. (that's likely where there 4.3.2 came from)
Then I tried just installing everything via YUM. That is likely where the 4.2.4 came from.
Attachments
nag-1.PNG
Last edited by Morty79 on Fri Jun 16, 2017 1:19 pm, edited 1 time in total.
Morty79
Posts: 5
Joined: Fri Jun 16, 2017 11:48 am

Re: Nagios Core - Not Running

Post by Morty79 »

[root@nms logs]# rpm -qa | grep nagios
nagios-common-4.2.4-2.el7.x86_64
nagios-plugins-flexlm-2.1.4-2.el7.x86_64
nagios-plugins-mailq-2.1.4-2.el7.x86_64
nagios-plugins-ntp-2.1.4-2.el7.x86_64
nagios-plugins-by_ssh-2.1.4-2.el7.x86_64
nagios-plugins-oracle-2.1.4-2.el7.x86_64
nagios-plugins-swap-2.1.4-2.el7.x86_64
nagios-plugins-procs-2.1.4-2.el7.x86_64
nagios-plugins-ping-2.1.4-2.el7.x86_64
nagios-plugins-rpc-2.1.4-2.el7.x86_64
nagios-plugins-disk_smb-2.1.4-2.el7.x86_64
nagios-plugins-cluster-2.1.4-2.el7.x86_64
nagios-plugins-ups-2.1.4-2.el7.x86_64
nagios-plugins-dns-2.1.4-2.el7.x86_64
nagios-plugins-nt-2.1.4-2.el7.x86_64
nagios-plugins-2.1.4-2.el7.x86_64
nagios-4.2.4-2.el7.x86_64
nagios-plugins-perl-2.1.4-2.el7.x86_64
nagios-plugins-file_age-2.1.4-2.el7.x86_64
nagios-plugins-breeze-2.1.4-2.el7.x86_64
nagios-plugins-wave-2.1.4-2.el7.x86_64
nagios-plugins-ide_smart-2.1.4-2.el7.x86_64
nagios-plugins-mysql-2.1.4-2.el7.x86_64
nagios-plugins-ldap-2.1.4-2.el7.x86_64
nagios-plugins-pgsql-2.1.4-2.el7.x86_64
nagios-plugins-overcr-2.1.4-2.el7.x86_64
nagios-plugins-nwstat-2.1.4-2.el7.x86_64
nagios-plugins-disk-2.1.4-2.el7.x86_64
nagios-plugins-users-2.1.4-2.el7.x86_64
nagios-plugins-sensors-2.1.4-2.el7.x86_64
nagios-plugins-fping-2.1.4-2.el7.x86_64
nagios-plugins-dummy-2.1.4-2.el7.x86_64
nagios-plugins-ntp-perl-2.1.4-2.el7.x86_64
nagios-plugins-smtp-2.1.4-2.el7.x86_64
nagios-plugins-snmp-2.1.4-2.el7.x86_64
nagios-plugins-time-2.1.4-2.el7.x86_64
nagios-plugins-dhcp-2.1.4-2.el7.x86_64
nagios-plugins-nagios-2.1.4-2.el7.x86_64
nagios-plugins-dig-2.1.4-2.el7.x86_64
nagios-plugins-log-2.1.4-2.el7.x86_64
nagios-plugins-http-2.1.4-2.el7.x86_64
nagios-plugins-all-2.1.4-2.el7.x86_64
nagios-plugins-ircd-2.1.4-2.el7.x86_64
nagios-plugins-mrtgtraf-2.1.4-2.el7.x86_64
nagios-plugins-hpjd-2.1.4-2.el7.x86_64
nagios-plugins-load-2.1.4-2.el7.x86_64
nagios-plugins-real-2.1.4-2.el7.x86_64
nagios-plugins-tcp-2.1.4-2.el7.x86_64
nagios-plugins-ssh-2.1.4-2.el7.x86_64
nagios-plugins-icmp-2.1.4-2.el7.x86_64
nagios-plugins-game-2.1.4-2.el7.x86_64
nagios-plugins-mrtg-2.1.4-2.el7.x86_64
nagios-devel-4.2.4-2.el7.x86_64
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios Core - Not Running

Post by dwhitfield »

It's probably going to be easier to yum remove nagios-common that it is to remove the compiled version without touching the yum repo.

Do you know at what point you had trouble with the compilation instructions? Were https://support.nagios.com/kb/article.php?id=96#CentOS the instructions you used? If not, can you run through those and see if you get better results?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Core - Not Running

Post by tgriep »

It looks line the nagios user account is missing and that could be the reason the command is failing.
Try running the following as root to create the user account and the nagios group.

Code: Select all

useradd nagios
usermod -a -G nagios apache
After that, see if the nagios daemon will start.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Morty79
Posts: 5
Joined: Fri Jun 16, 2017 11:48 am

Re: Nagios Core - Not Running

Post by Morty79 »

Following the steps on that link:

[root@nms nagioscore-nagios-4.3.2]# systemctl enable nagios.service
nagios.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig nagios on

Is that right?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Nagios Core - Not Running

Post by cdienger »

That ouput is okay and expected. It just means the nagios service isn't using systemd and systemd is smart enough to redirect to chkconfig.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Morty79
Posts: 5
Joined: Fri Jun 16, 2017 11:48 am

Re: Nagios Core - Not Running

Post by Morty79 »

Looks like that fixed it up.

I can login and everything on the localhost is GREEN except for HTTP (Yellow warning) ?

Thanks for the help on the install. Been several years since I setup Nagios.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Nagios Core - Not Running

Post by cdienger »

Glad to help : ) We'll lock this up. Feel free to post again if you need anything else!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked