Page 5 of 7

Re: Consulta Nagvis

Posted: Mon Aug 20, 2018 4:51 pm
by ssax
Did you edit your /usr/local/nagios/etc/ndo2db.cfg and change these settings?

Code: Select all

db_user=ndoutils
db_pass=ndoutils_password

Re: Consulta Nagvis

Posted: Mon Aug 20, 2018 5:10 pm
by alex3105
Dear Saxs,

Editing the /usr/local/nagios/etc/ndo2db.cfg modify db_user y db_pass then enabling debul_level=-1 and restarting ndo2 services and nagios does not generate the file /usr/local/nagios/var/ndo2db.debug.

Ok what I'm doing to generate the requested file..?

Greetings.

Re: Consulta Nagvis

Posted: Tue Aug 21, 2018 3:28 pm
by scottwilkerson
Run thisand report output

Code: Select all

ps -ef|grep ndo2db
Are all the processes newer than the time you restarted? is the path the the config the exact path of the file you edited?

Re: Consulta Nagvis

Posted: Tue Aug 21, 2018 3:30 pm
by ssax
In addition to what scottwilkerson posted.

Please send the full output of these commands as well:

Code: Select all

ls -ld /usr/local/nagios
ls -l /usr/local/nagios
ls -l /usr/local/nagios/bin
ls -l /usr/local/nagios/etc
ls -l /usr/local/nagios/var
Thank you

Re: Consulta Nagvis

Posted: Wed Aug 22, 2018 4:07 pm
by alex3105
Sorry for the delay .. Attached as requested .

[root@localhost nagios]# ps -ef|grep ndo2db
root 14700 6219 0 15:24 pts/0 00:00:00 grep --color=auto ndo2db
[root@localhost nagios]#


[root@localhost nagios]# ls -ld /usr/local/nagios/
drwxr-xr-x. 9 root root 94 jul 31 09:03 /usr/local/nagios/
[root@localhost nagios]#



[root@localhost nagios]# ls -l /usr/local/nagios/
total 12
drwxrwxr-x. 2 nagios nagios 117 ago 15 10:19 bin
drwxrwxr-x. 3 nagios nagios 132 ago 15 10:26 etc
drwxr-xr-x. 2 root root 6 jul 31 09:03 include
drwxrwxr-x. 2 nagios nagios 4096 ago 2 08:23 libexec
drwxrwxr-x. 2 nagios nagios 4096 jul 31 08:54 sbin
drwxrwxr-x. 15 nagios nagios 4096 jul 31 09:03 share
drwxrwxr-x. 5 nagios nagios 181 ago 22 15:26 var
[root@localhost nagios]#


[root@localhost nagios]# ls -l /usr/local/nagios/bin
total 1408
-rwxrwxr-- 1 nagios nagios 45952 ago 15 10:19 file2sock
-rwxrwxr-- 1 nagios nagios 51336 ago 15 10:19 log2ndo
-rwxrwxr--. 1 nagios nagios 709072 jul 31 08:54 nagios
-rwxrwxr--. 1 nagios nagios 39640 jul 31 08:54 nagiostats
-rwxr-xr-x 1 nagios nagios 333256 ago 15 10:19 ndo2db
-rwxr-xr-x 1 nagios nagios 204064 ago 15 10:19 ndomod.o
-rwxrwxr-- 1 nagios nagios 43848 ago 15 10:19 sockdebug
[root@localhost nagios]#


[root@localhost nagios]# ls -l /usr/local/nagios/etc
total 92
-rw-rw-r--. 1 nagios nagios 13710 jul 31 08:55 cgi.cfg
-rw-r--r--. 1 root root 50 jul 31 08:56 htpasswd.users
-rw-rw-r--. 1 nagios nagios 48766 ago 15 10:27 nagios.cfg
-rw-r--r-- 1 nagios nagios 6172 ago 20 16:59 ndo2db.cfg
-rw-r--r-- 1 nagios nagios 5106 ago 16 09:41 ndomod.cfg
drwxrwxr-x. 2 nagios nagios 4096 ago 7 17:37 objects
-rw-rw----. 1 nagios nagios 1312 jul 31 08:55 resource.cfg
[root@localhost nagios]#


[root@localhost nagios]# ls -l /usr/local/nagios/var
total 13708
drwxrwxr-x. 2 nagios nagios 4096 ago 21 23:59 archives
-rw-r--r-- 1 nagios nagios 3192163 ago 22 15:27 nagios.log
-rw-rw-r-- 1 nagios nagios 2384879 ago 18 02:17 nagios.tmp7LtBP5
-rw-r--r-- 1 nagios nagios 0 ago 20 17:00 ndomod.tmp
srwxr-xr-x 1 nagios nagios 0 ago 17 17:11 ndo.sock
-rw-r--r--. 1 nagios nagios 1448439 ago 20 17:00 objects.cache
-rw------- 1 nagios nagios 2367924 ago 22 15:00 retention.dat
drwxrwsrwx. 2 nagios nagios 41 ago 20 17:00 rw
drwxr-xr-x. 3 root root 26 jul 31 08:54 spool
-rw-rw-r-- 1 nagios nagios 2410461 ago 22 15:27 status.dat
[root@localhost nagios]#

Re: Consulta Nagvis

Posted: Wed Aug 22, 2018 4:26 pm
by ssax
Try running these commands:

Code: Select all

touch /usr/local/nagios/var/ndo2db.debug
chmod 644 /usr/local/nagios/var/ndo2db.debug
chown nagios.nagios /usr/local/nagios/var/ndo2db.debug
service ndo2db restart
Does anything get put into the debug file?

Send the output of this command as well:

Code: Select all

service ndo2db status -l

Re: Consulta Nagvis

Posted: Wed Aug 22, 2018 4:39 pm
by alex3105
I verify that the debug file is empty.

[root@localhost nagios]# touch /usr/local/nagios/var/ndo2db.debug
[root@localhost nagios]# chmod 644 /usr/local/nagios/var/ndo2db.debug
[root@localhost nagios]# chown nagios.nagios /usr/local/nagios/var/ndo2db.debug
[root@localhost nagios]# service ndo2db restart
Redirecting to /bin/systemctl restart ndo2db.service
[root@localhost nagios]# ll /usr/local/nagios/var/ndo2db.debug
-rw-r--r-- 1 nagios nagios 0 ago 22 16:30 /usr/local/nagios/var/ndo2db.debug
[root@localhost nagios]# service ndo2db status -l
Redirecting to /bin/systemctl status -l ndo2db.service
● ndo2db.service - Nagios Data Out Daemon
Loaded: loaded (/usr/lib/systemd/system/ndo2db.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since mié 2018-08-22 16:33:19 -05; 1min 7s ago
Docs: http://www.nagios.org/documentation
Process: 15820 ExecStopPost=/bin/rm -f /usr/local/nagios/var/ndo2db.pid (code=exited, status=0/SUCCESS)
Process: 15813 ExecStart=/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f (code=exited, status=1/FAILURE)
Main PID: 15813 (code=exited, status=1/FAILURE)

ago 22 16:33:19 localhost.localdomain systemd[1]: Started Nagios Data Out Daemon.
ago 22 16:33:19 localhost.localdomain systemd[1]: Starting Nagios Data Out Daemon...
ago 22 16:33:19 localhost.localdomain ndo2db[15813]: Could not bind socket: Address already in use
ago 22 16:33:19 localhost.localdomain systemd[1]: ndo2db.service: main process exited, code=exited, status=1/FAILURE
ago 22 16:33:19 localhost.localdomain systemd[1]: Unit ndo2db.service entered failed state.
ago 22 16:33:19 localhost.localdomain systemd[1]: ndo2db.service failed.
[root@localhost nagios]#

Re: Consulta Nagvis

Posted: Wed Aug 22, 2018 4:50 pm
by tgriep
Try restarting the ndo2db daemon and then check the /var/log/messages file for any errors and post them here.
Also, can you run the following commands as root and post the output here?

Code: Select all

ls -l /usr/local/nagios
ls -l /usr/local/nagios/var
Thanks

Re: Consulta Nagvis

Posted: Wed Aug 22, 2018 4:52 pm
by ssax
In addition to what tgriep posted:

Code: Select all

Could not bind socket: Address already in use
Try this:

Code: Select all

service nagios stop
service ndo2db stop
killall -9 ndo2db
pkill -9 ndo2db
service ndo2db start
service nagios start

Re: Consulta Nagvis

Posted: Wed Aug 22, 2018 5:04 pm
by alex3105
Attached as requested.


/var/log/messages

Aug 22 16:55:45 localhost systemd: Started Nagios Data Out Daemon.
Aug 22 16:55:45 localhost systemd: Starting Nagios Data Out Daemon...
Aug 22 16:55:45 localhost ndo2db: Could not bind socket: Address already in use
Aug 22 16:55:45 localhost systemd: ndo2db.service: main process exited, code=exited, status=1/FAILURE
Aug 22 16:55:45 localhost systemd: Unit ndo2db.service entered failed state.
Aug 22 16:55:45 localhost systemd: ndo2db.service failed.


[root@localhost nagios]# ls -l /usr/local/nagios/
total 12
drwxrwxr-x. 2 nagios nagios 117 ago 15 10:19 bin
drwxrwxr-x. 3 nagios nagios 132 ago 15 10:26 etc
drwxr-xr-x. 2 root root 6 jul 31 09:03 include
drwxrwxr-x. 2 nagios nagios 4096 ago 2 08:23 libexec
drwxrwxr-x. 2 nagios nagios 4096 jul 31 08:54 sbin
drwxrwxr-x. 15 nagios nagios 4096 jul 31 09:03 share
drwxrwxr-x. 5 nagios nagios 201 ago 22 17:00 var


[root@localhost nagios]# ls -l /usr/local/nagios/var
total 15016
drwxrwxr-x. 2 nagios nagios 4096 ago 21 23:59 archives
-rw-r--r-- 1 nagios nagios 3468939 ago 22 17:01 nagios.log
-rw-rw-r-- 1 nagios nagios 2384879 ago 18 02:17 nagios.tmp7LtBP5
-rw-r--r-- 1 nagios nagios 0 ago 22 16:30 ndo2db.debug
-rw-r--r-- 1 nagios nagios 0 ago 20 17:00 ndomod.tmp
srwxr-xr-x 1 nagios nagios 0 ago 17 17:11 ndo.sock
-rw-r--r--. 1 nagios nagios 1448439 ago 20 17:00 objects.cache
-rw------- 1 nagios nagios 2367256 ago 22 17:00 retention.dat
drwxrwsrwx. 2 nagios nagios 41 ago 20 17:00 rw
drwxr-xr-x. 3 root root 26 jul 31 08:54 spool
-rw-rw-r-- 1 nagios nagios 2409006 ago 22 17:00 status.dat