Consulta Nagvis

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.
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Consulta Nagvis

Post by alex3105 »

I executed them and I got a state

[root@localhost nagios]# service nagios stop
Redirecting to /bin/systemctl stop nagios.service
[root@localhost nagios]# service ndo2db stop
Redirecting to /bin/systemctl stop ndo2db.service
[root@localhost nagios]# killall -9 ndo2db
ndo2db: no process found
[root@localhost nagios]# pkill -9 ndo2db
[root@localhost nagios]# service ndo2db start
Redirecting to /bin/systemctl start ndo2db.service
[root@localhost nagios]# service nagios start
Redirecting to /bin/systemctl start nagios.service
[root@localhost nagios]#
[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 17:09:18 -05; 3min 47s ago
Docs: http://www.nagios.org/documentation
Process: 19071 ExecStopPost=/bin/rm -f /usr/local/nagios/var/ndo2db.pid (code=exited, status=0/SUCCESS)
Process: 19062 ExecStart=/usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f (code=exited, status=1/FAILURE)
Main PID: 19062 (code=exited, status=1/FAILURE)

ago 22 17:09:18 localhost.localdomain systemd[1]: Started Nagios Data Out Daemon.
ago 22 17:09:18 localhost.localdomain systemd[1]: Starting Nagios Data Out Daemon...
ago 22 17:09:18 localhost.localdomain ndo2db[19062]: Could not bind socket: Address already in use
ago 22 17:09:18 localhost.localdomain systemd[1]: ndo2db.service: main process exited, code=exited, status=1/FAILURE
ago 22 17:09:18 localhost.localdomain systemd[1]: Unit ndo2db.service entered failed state.
ago 22 17:09:18 localhost.localdomain systemd[1]: ndo2db.service failed.
[root@localhost nagios]#
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Consulta Nagvis

Post by ssax »

Try this:

Code: Select all

rm -rf /usr/local/nagios/var/ndo.sock
service ndo2db start
service ndo2db status -l
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Consulta Nagvis

Post by alex3105 »

Thank you .. now I have obtained this result ..

[root@localhost nagios]# rm -rf /usr/local/nagios/var/ndo.sock
[root@localhost nagios]# service ndo2db start
Redirecting to /bin/systemctl start ndo2db.service
[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: active (running) since jue 2018-08-23 16:10:21 -05; 7s ago
Docs: http://www.nagios.org/documentation
Process: 19071 ExecStopPost=/bin/rm -f /usr/local/nagios/var/ndo2db.pid (code=exited, status=0/SUCCESS)
Main PID: 13158 (ndo2db)
Tasks: 1
CGroup: /system.slice/ndo2db.service
└─13158 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg -f

ago 23 16:10:21 localhost.localdomain systemd[1]: Started Nagios Data Out Daemon.
ago 23 16:10:21 localhost.localdomain systemd[1]: Starting Nagios Data Out Daemon...
[root@localhost nagios]#
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Consulta Nagvis

Post by ssax »

Are you seeing anything in your /var/log/messages or nagios.log file or in the ndo2db.debug file?

Please run this command and attach the resulting /tmp/ndo_files.zip file:

Code: Select all

zip -r /tmp/ndo_files.zip /usr/local/nagios/etc
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Consulta Nagvis

Post by alex3105 »

Dear Ssax,

The file degub is empty, I do not see anything in the archives logs and messages.
Attachments
ndo_files.rar
(33.53 KiB) Downloaded 278 times
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Consulta Nagvis

Post by ssax »

What are you seeing in your nagios.log file? Can you see anything that would indicate an error with anything?

What is the output of these commands:

grep ndo /usr/local/nagios/var/nagios.log
echo 'select * from nagios.nagios_logentries;' | mysql -u ndoutils -p'ndoutils_password'
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Consulta Nagvis

Post by alex3105 »

In the log file I only see events from my computers monitored, I do not see any errors.

grep ndo /usr/local/nagios/var/nagios.log
I only see events from my computers monitored, no errors

echo 'select * from nagios.nagios_logentries;' | mysql -u ndoutils -p'ndoutils_password'
do not show records.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Consulta Nagvis

Post by ssax »

When I import your configs into mine and change the user/password for the DB (because mine are different) it works.

What is the output of this command:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Consulta Nagvis

Post by alex3105 »

The result is: Things look okay - No serious problems were detected during the preflight check

It seems strange to me ... I do not know what it could be .. I'm going to investigate how to make nagvis work with ndoutils .. this already seems frustrating ..

Greetings,
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Consulta Nagvis

Post by ssax »

So it looks like NDO2DB started properly, did you try restarting nagios after?

Code: Select all

service nagios restart
Additionally, what is the output of these commands:

Code: Select all

ps aux | grep nagios.cfg
sestatus
Locked