Problem with nagios and ndoutils

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.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Problem with nagios and ndoutils

Post 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?
eFusion
Posts: 33
Joined: Wed Jan 29, 2014 9:52 am

Re: Problem with nagios and ndoutils

Post 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
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Problem with nagios and ndoutils

Post 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
eFusion
Posts: 33
Joined: Wed Jan 29, 2014 9:52 am

Re: Problem with nagios and ndoutils

Post 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?
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: Problem with nagios and ndoutils

Post 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/
Be sure to check out our Knowledgebase for helpful articles and solutions!
eFusion
Posts: 33
Joined: Wed Jan 29, 2014 9:52 am

Re: Problem with nagios and ndoutils

Post by eFusion »

Launched ndo2db - wait awhile
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Problem with nagios and ndoutils

Post 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.
Locked