Page 1 of 1

Trouble turning off notifications

Posted: Fri Dec 09, 2011 5:25 pm
by cwscribner
Hi all.

The title pretty much says it all. I tried several times to turn of notifications via the monitoring engine widget but they wouldn't turn off (or they didn't appear turned off by the system indicator or widget). So I proceeded to turn them off in the core config file. Even after doing that and restarting Nagios, notifications still appeared to be turned on. I attempted to stop notifications 3 more times through the widget, restarting the monitoring engine several times through this process, before they finally showed an off indicator. Any ideas on where the hang up might be?

Re: Trouble turning off notifications

Posted: Mon Dec 12, 2011 11:34 am
by mguthrie
It could be a permissions issue with the nagios.cmd pipe. Can you check the permissions on the /usr/local/nagios/var/rw/nagios.cmd file? This file should get recreated each time nagios is restarted.

You can also do a running tail on the following file to trace commands being sent through the XI interface.

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
And then try turning off the notifications.

Re: Trouble turning off notifications

Posted: Mon Dec 12, 2011 11:45 am
by cwscribner

Code: Select all

prw-rw---- 1 nagios nagcmd 0 Dec  9 17:15 /usr/local/nagios/var/rw/nagios.cmd

Re: Trouble turning off notifications

Posted: Mon Dec 12, 2011 4:07 pm
by mguthrie
Can you try running the following:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
And then submitting the command from the web interface to enable or disable notifications?

Re: Trouble turning off notifications

Posted: Mon Dec 12, 2011 4:30 pm
by cwscribner
Must've been a fluke. I wasn't able to reproduce the same problem. Here's the output:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
..................................................PROCESSING COMMAND ID 2130...
PROCESS COMMAND: CMD=16, DATA=a:1:{s:3:"cmd";i:12;}
COMMAND DATA: a:1:{s:3:"cmd";i:12;}
CMDARR:
Array
(
    [cmd] => 12
)
CORE CMD: ENABLE_NOTIFICATIONS;0
SUBMITTING A NAGIOSCORE COMMAND...
.........
PROCESSED 1 COMMANDS
tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
...........................................PROCESSING COMMAND ID 2131...
PROCESS COMMAND: CMD=16, DATA=a:1:{s:3:"cmd";i:11;}
COMMAND DATA: a:1:{s:3:"cmd";i:11;}
CMDARR:
Array
(
    [cmd] => 11
)
CORE CMD: DISABLE_NOTIFICATIONS;0
SUBMITTING A NAGIOSCORE COMMAND...
..............tail: /usr/local/nagiosxi/var/cmdsubsys.log: file truncated
.
PROCESSED 1 COMMANDS


[1]+  Stopped                 tail -f /usr/local/nagiosxi/var/cmdsubsys.log
You have new mail in /var/spool/mail/root

Re: Trouble turning off notifications

Posted: Tue Dec 13, 2011 12:42 pm
by mguthrie
Ok, if the issue reappears keep an eye on that log and see if it produces anything telling.