Page 1 of 2

Can't stop, start, or delete sources

Posted: Tue Sep 09, 2014 1:52 pm
by andrewc
Currently running NNA version 2014R1.0. I am unable to do the following:

- stop sources which are started
- start sources which are stopped
- delete sources which are stopped

I have been monitoring the backend.log file in the /usr/local/nagiosna/var directory, but there is nothing which seems to indicate errors. Please advise on next troubleshooting steps.

Re: Can't stop, start, or delete sources

Posted: Tue Sep 09, 2014 5:11 pm
by tmcdonald
Do you get any errors on-screen? Anything in /var/log/httpd/error_log?

Re: Can't stop, start, or delete sources

Posted: Wed Sep 10, 2014 10:12 am
by andrewc
There don't appear to be errors on screen. But here is the contents of the error_log:

du: cannot access `/usr/local/nagiosna/var/andrewtest': No such file or directory
ERROR: opening '/usr/local/nagiosna/var/MMOL-ACE-1/bandwidth.rrd': No such file or directory
ERROR: opening '/usr/local/nagiosna/var/waynetest/bandwidth.rrd': No such file or directory
ERROR: opening '/usr/local/nagiosna/var/andrewtest/bandwidth.rrd': No such file or directory
ERROR: opening '/usr/local/nagiosna/var/MMOL-2/bandwidth.rrd': No such file or directory
ERROR: opening '/usr/local/nagiosna/var/MMOL-1/bandwidth.rrd': No such file or directory
sudo: no tty present and no askpass program specified
du: cannot access `/usr/local/nagiosna/var/andrewtest': No such file or directory
sudo: no tty present and no askpass program specified
du: cannot access `/usr/local/nagiosna/var/andrewtest': No such file or directory
sudo: no tty present and no askpass program specified
du: cannot access `/usr/local/nagiosna/var/andrewtest': No such file or directory
sudo: no tty present and no askpass program specified
du: cannot access `/usr/local/nagiosna/var/andrewtest': No such file or directory
sudo: no tty present and no askpass program specified
du: cannot access `/usr/local/nagiosna/var/andrewtest': No such file or directory
sudo: no tty present and no askpass program specified
sudo: no tty present and no askpass program specified
du: cannot access `/usr/local/nagiosna/var/andrewtest': No such file or directory
du: cannot access `/usr/local/nagiosna/var/andrewtest': No such file or directory
du: cannot access `/usr/local/nagiosna/var/andrewtest': No such file or directory
du: cannot access `/usr/local/nagiosna/var/andrewtest': No such file or directory

Re: Can't stop, start, or delete sources

Posted: Wed Sep 10, 2014 5:20 pm
by tmcdonald
Was this a pre-built VM or did you install NNA from source?

What are the permissions on that directory?

Code: Select all

ls -ld /usr/local/nagiosna/var/

Re: Can't stop, start, or delete sources

Posted: Thu Sep 11, 2014 9:12 am
by andrewc
One of my colleagues has indicated that NNA was installed on a server already running Nagios XI. Not sure if XI was installed using pre-built VM or source. Here is the output of requested command:

drwsrwsr-x+ 6 nna nnacmd 4096 Sep 9 15:52 /usr/local/nagiosna/var/

Re: Can't stop, start, or delete sources

Posted: Fri Sep 12, 2014 12:12 pm
by sreinhardt
The user and group look great, but I am wondering about the sticky bit that should be just standard execute. Let's take a look at files below it before making changes though.

Code: Select all

ls -lart /usr/local/nagiosna/var/

Re: Can't stop, start, or delete sources

Posted: Fri Sep 12, 2014 12:46 pm
by andrewc
Here's the output. It's odd that one of my sources, 'andrewtest', is not listed below but shows up via GUI.

ls -lart /usr/local/nagiosna/var/
total 6284
drwsrwsr-t 5 nna nnacmd 4096 Jul 7 20:57 ..
drwsrwsr-x+ 6 nna nnacmd 4096 Sep 9 15:52 .
drwxrwsr-x+ 3 nna nnacmd 4096 Sep 9 15:53 waynetest
drwxrwsr-x+ 3 nna nnacmd 4096 Sep 9 15:53 MMOL-ACE-1
drwxrwsr-x+ 4 nna nnacmd 4096 Sep 9 15:53 MMOL-2
drwxrwsr-x+ 3 nna nnacmd 4096 Sep 9 15:53 MMOL-1
-rw-rw-r--+ 1 nna nnacmd 6397952 Sep 12 17:40 backend.log

Re: Can't stop, start, or delete sources

Posted: Fri Sep 12, 2014 4:10 pm
by lmiltchev
Did you have NNA running on OpenVZ virtual server by any chance? What is the output of the following commands?

Code: Select all

which rrdtool
cat /etc/sudoers.d/nna_conf

Re: Can't stop, start, or delete sources

Posted: Fri Sep 12, 2014 4:43 pm
by andrewc
I have reached out to one of my colleagues with your question about OpenVZ. Here is the requested output.

which rrdtool
/usr/local/bin/rrdtool

sudo cat /etc/sudoers.d/nna_conf
Defaults:%nnacmd !requiretty

Cmnd_Alias LIST = /sbin/iptables --list
Cmnd_Alias SAVE = /etc/init.d/iptables save
Cmnd_Alias UPDATE = /sbin/iptables -I INPUT -p udp -j ACCEPT --dport *
Cmnd_Alias DAEMON = /usr/local/nagiosna/bin/nagiosna *

%nnacmd ALL=(ALL) NOPASSWD:LIST
%nnacmd ALL=(ALL) NOPASSWD:SAVE
%nnacmd ALL=(ALL) NOPASSWD:UPDATE
%nnacmd ALL=(ALL) NOPASSWD:/bin/kill *
%nnacmd ALL=(ALL) NOPASSWD:DAEMON

Re: Can't stop, start, or delete sources

Posted: Mon Sep 15, 2014 9:01 am
by andrewc
To answer a previous question, we are using VMware ESXi for VM. OpenVZ is not being used.