Page 1 of 2

Active host & service checks and notifications are disabled

Posted: Sun Aug 25, 2013 10:23 pm
by chrisp
Hi,

I'm trying to test some stuff we're planning on doing, on a separate instance of our main subscribed NagiosXI server, prior to deploying on the live server, but I've come across a problem.

There was a plain Nagios Core installed before I installed XI, so I did "yum -y remove nagios" before the XI install, then after XI installed (xi-2012r2.3), I imported the configs from the old Core files & I see the old hosts & services when looking at the CCM, but I do not see anything in the status.php & the system status indicators are showing green, green, green, blue, blue, blue - meaning: -

* Monitoring Engine Is Running
* Performance Grapher Is Running
* Database Backend Is Running
* Active Host Checks Are Disabled
* Active Service Checks Are Disabled
* Notifications Are Disabled

If I click on the blue icons, I see a red one for the process state, even though the process is running.

I Googled and searched this forum, but the only thing I found was this but the values are pre-configured on my system & the problem doesn't go away after 5-6 mins.

What have I done wrong or missed (it's bound to be something daft)?

Re: Active host & service checks and notifications are disab

Posted: Mon Aug 26, 2013 10:11 am
by sreinhardt
Are you able to enable host and service checks via the admin->Monitoring System Status page? If not, what is the process state there?

Re: Active host & service checks and notifications are disab

Posted: Mon Aug 26, 2013 11:06 am
by chrisp
When I press the "Play" icon, this happens in the nagios.log: -

Code: Select all

[1377533104] Nagios 3.5.0 starting... (PID=29941)
[1377533104] Local time is Mon Aug 26 16:05:04 UTC 2013
[1377533104] LOG VERSION: 2.0
[1377533104] Lockfile '/usr/local/nagios/var/nagios.lock' looks like its already held by another instance of Nagios (PID 3917).  Bailing out...

Re: Active host & service checks and notifications are disab

Posted: Mon Aug 26, 2013 11:09 am
by sreinhardt
OK, lets try killing and restarting all the important nagios stuff.

Code: Select all

service ndo2db stop
service nagios stop
killall -9 nagios
ll /usr/local/nagios/var/nagios.lock (This should not exist at this point, remove if it does)
service nagios start
service ndo2db start
Just to check permissions, lets also:

Code: Select all

ll /usr/local/nagios/var/

Re: Active host & service checks and notifications are disab

Posted: Mon Aug 26, 2013 11:20 am
by chrisp
Sorry, bit of premature postage there...

OK, I've done all the restarty stuff (& confirm that the nagios.lock file did not exist when listed). I have also rebooted a couple of times too (before posting here).

Code: Select all

[Monday 26 August 2013 17:08:32] # ll /usr/local/nagios/var/
total 212K
drwxrwxr-x 2 nagios nagios  12K Aug 26 01:00 archives/
-rw-r--r-- 1 nagios nagios    6 Aug 26 17:13 nagios.lock
-rw-rw-r-- 1 nagios users  8.5K Aug 26 17:13 nagios.log
-rw-r--r-- 1 nagios nagios    5 Aug 24 23:37 ndo2db.lock
srwxr-xr-x 1 nagios nagios    0 Aug 24 23:37 ndo.sock=
-rw-r--r-- 1 nagios nagios  548 Aug 24 23:37 npcd.log
-rw-r--r-- 1 nagios nagios  41K Aug 26 17:13 objects.cache
-rw------- 1 nagios nagios  57K Aug 26 17:13 retention.dat
drwxrwsr-x 2 nagios nagcmd 4.0K Aug 26 17:13 rw/
drwxr-xr-x 5 root   root   4.0K Aug 24 13:49 spool/
drwxr-xr-x 2 nagios nagios 4.0K Aug 24 13:51 stats/
-rw-rw-r-- 1 nagios users   57K Aug 26 17:20 status.dat

Re: Active host & service checks and notifications are disab

Posted: Mon Aug 26, 2013 11:34 am
by sreinhardt
Well your permissions look fine, are you still having issues, or did killing and restarting work? I do notice that the ndo2db and nagios lock files have vastly different times on them, if you just restarted both services, those should be within a minute or two of each other.

Re: Active host & service checks and notifications are disab

Posted: Mon Aug 26, 2013 12:33 pm
by chrisp
Yeah, my keyboard & mouse are conspiring against me today, making me post before I'm ready!

This is the actual latest.

Code: Select all

[Monday 26 August 2013 18:26:28] # ll /usr/local/nagios/var/           
total 212K
drwxrwxr-x 2 nagios nagios  12K Aug 26 01:00 archives/
-rw-r--r-- 1 nagios nagios    6 Aug 26 18:26 nagios.lock
-rw-rw-r-- 1 nagios users  9.1K Aug 26 18:26 nagios.log
-rw-r--r-- 1 nagios nagios    6 Aug 26 18:26 ndo2db.lock
srwxr-xr-x 1 nagios nagios    0 Aug 26 18:26 ndo.sock=
-rw-r--r-- 1 nagios nagios  548 Aug 24 23:37 npcd.log
-rw-r--r-- 1 nagios nagios  41K Aug 26 18:26 objects.cache
-rw------- 1 nagios users   57K Aug 26 18:26 retention.dat
drwxrwsr-x 2 nagios nagcmd 4.0K Aug 26 18:26 rw/
drwxr-xr-x 5 root   root   4.0K Aug 24 13:49 spool/
drwxr-xr-x 2 nagios nagios 4.0K Aug 24 13:51 stats/
-rw-rw-r-- 1 nagios nagios  57K Aug 26 18:26 status.dat

Re: Active host & service checks and notifications are disab

Posted: Mon Aug 26, 2013 12:38 pm
by sreinhardt
Just to make sure it's working, run:
chown nagios.nagios /usr/local/nagios/var/nagios.lock
Basically, you are seeing that lock file get created as nagios.users, which apache is not a part of the users group. Within about 30 seconds of the change, you should see the status page show nagios process as up. Then we need to work out why it is being created incorrectly.

Re: Active host & service checks and notifications are disab

Posted: Mon Aug 26, 2013 1:37 pm
by chrisp
No, it's the nagios.log file that is nagios:users nagios.lock is definitely being created with nagios:nagios ownership...

Re: Active host & service checks and notifications are disab

Posted: Mon Aug 26, 2013 1:43 pm
by sreinhardt
doh, my brain isn't working today. So then, any luck with the webui changes, or is that still a no-g as well?