Page 5 of 5

Re: Problem with nagios and ndoutils

Posted: Mon Mar 30, 2015 12:13 pm
by jdalrymple
eFusion wrote: ndo2db:

Code: Select all

lock_file=/usr/local/nagios/var/ndo2db.lock
ndo2db_user=nagios
ndo2db_group=nagios
socket_type=unix
#socket_type=tcp
socket_name=/usr/local/nagios/var/ndo.sock
...
Not once...
eFusion wrote: /usr/local/nagios/var#

Code: Select all

ls -lG
total 42
-rw-r--r--  1 nagios  nagios  86537 Mar  4 13:14 ndo2db.debug
but twice...
eFusion wrote: ls -lG /usr/local/nagios/var/

Code: Select all

total 53
-rw-r--r-- 1 nagios nagios 110918 Mar 18 15:24 ndo2db.debug
No UNIX socket. Does the nagios user have rwx permissions for that /usr/local/nagios/var directory?

Re: Problem with nagios and ndoutils

Posted: Tue Mar 31, 2015 2:29 am
by eFusion
/usr/local/nagios]# ls -al

Code: Select all

drwxr-xr-x   4 nagios  nagios   4 Feb 26 11:07 .
drwxr-xr-x  16 root    wheel   16 Feb 26 10:13 ..
drwxrwxr-x   2 nagios  nagios   9 Feb 26 10:49 bin
drwxrwxr-x   2 nagios  nagios   3 Mar 30 17:44 var
/usr/local]# ls -al

Code: Select all

drwxr-xr-x  16 root    wheel    16 Feb 26 10:13 .
drwxr-xr-x  17 root    wheel    17 Nov 13  2013 ..
...
drwxr-xr-x   4 nagios  nagios    4 Feb 26 11:07 nagios

Re: Problem with nagios and ndoutils

Posted: Tue Mar 31, 2015 2:14 pm
by jdalrymple
What is inside /usr/local/nagios/var/ WHILE NAGIOS IS RUNNING is what matters. Without that socket ndo2db will not work.

--edit--

turned "lockfile" into "socket" ... oops

Re: Problem with nagios and ndoutils

Posted: Wed Apr 01, 2015 5:51 am
by eFusion
How to make the file appear?
Another thing: after start ndo2db in console and restart nagios, in nagios web-interface status of objects and services are not update unless kill ndo and restart nagios again. This is due to lack of file?

Re: Problem with nagios and ndoutils

Posted: Wed Apr 01, 2015 9:22 am
by tgriep
If you are killing the ndo2db service, that is why none of your host and services are being added to the MYSQL database. The ndo2db service is what puts them in there.
Start up the ndo2db and nagios services, let them run for a long time to see it they get updated. Since you have a lot to add to the database, it might take a while to do so.
While it it running, run the following to see if the ndo2db.lock and ndo.sock files are created.

Code: Select all

ll /usr/local/nagios/var/

Re: Problem with nagios and ndoutils

Posted: Thu Apr 02, 2015 4:05 am
by eFusion
Launched ndo2db - wait awhile

Re: Problem with nagios and ndoutils

Posted: Thu Apr 02, 2015 12:10 pm
by jdalrymple
tgriep wrote:While it it running, run the following to see if the ndo2db.lock and ndo.sock files are created.

Code: Select all

ll /usr/local/nagios/var/
If they're not - ndo2db WILL NOT work.