Page 3 of 7

Re: Consulta Nagvis

Posted: Thu Aug 16, 2018 11:53 am
by alex3105
If it is started ..


Greetings

Re: Consulta Nagvis

Posted: Thu Aug 16, 2018 11:57 am
by scottwilkerson
alex3105 wrote:If it is started ..


Greetings
Huh?

Re: Consulta Nagvis

Posted: Thu Aug 16, 2018 12:05 pm
by alex3105
I attach the status of the service:

[root@localhost nagios]# service ndo2db status
Redirecting to /bin/systemctl status 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-16 09:17:08 -05; 2h 42min ago
Docs: http://www.nagios.org/documentation
Process: 13520 ExecStopPost=/bin/rm -f /usr/local/nagios/var/ndo2db.pid (code=exited, status=0/SUCCESS)
Main PID: 13527 (ndo2db)
Tasks: 1
CGroup: /system.slice/ndo2db.service
└─13527 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg ...

ago 16 09:17:08 localhost.localdomain systemd[1]: Started Nagios Data Out Daemon.
ago 16 09:17:08 localhost.localdomain systemd[1]: Starting Nagios Data Out Daemon...

Re: Consulta Nagvis

Posted: Thu Aug 16, 2018 12:07 pm
by scottwilkerson
Ok, that looks good. Now after modifying the nagios.cfg to add the ndo2db line, did you restart nagios?

Code: Select all

service nagios restart
After doing that what output do you get running

Code: Select all

echo 'select * from nagios.nagios_logentries;' | mysql -u ndoutils -p'ndoutils_password' nagios

Re: Consulta Nagvis

Posted: Thu Aug 16, 2018 2:27 pm
by alex3105
Add this line to the file nagios.cfg

broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg

Restart the service, but I do not see records.

[root@localhost nagios]# service ndo2db statusRedirecting to /bin/systemctl status 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-16 09:17:08 -05; 4h 49min ago
Docs: http://www.nagios.org/documentation
Process: 13520 ExecStopPost=/bin/rm -f /usr/local/nagios/var/ndo2db.pid (code=exited, status=0/SUCCESS)
Main PID: 13527 (ndo2db)
Tasks: 3
CGroup: /system.slice/ndo2db.service
├─13244 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg ...
├─13249 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg ...
└─13527 /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg ...

ago 16 09:17:08 localhost.localdomain systemd[1]: Started Nagios Data Out Daemon.
ago 16 09:17:08 localhost.localdomain systemd[1]: Starting Nagios Data Out Daemon...
ago 16 13:33:28 localhost.localdomain ndo2db[13244]: Successfully connected to MySQ...e
ago 16 13:33:28 localhost.localdomain ndo2db[13249]: Successfully connected to MySQ...e
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost nagios]#

[root@localhost Documentos]# grep ndo /usr/local/nagios/etc/nagios.cfg
# Definitions for monitoring a Windows machine
#cfg_file=/usr/local/nagios/etc/objects/windows.cfg
# This option determines the "window" of time (in seconds) that
auto_rescheduling_window=180
broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg

Re: Consulta Nagvis

Posted: Thu Aug 16, 2018 2:33 pm
by scottwilkerson
scottwilkerson wrote:

After doing that what output do you get running

Code: Select all

echo 'select * from nagios.nagios_logentries;' | mysql -u ndoutils -p'ndoutils_password' nagios

Re: Consulta Nagvis

Posted: Thu Aug 16, 2018 2:34 pm
by scottwilkerson
scottwilkerson wrote:
scottwilkerson wrote:

After doing that what output do you get running

Code: Select all

echo 'select * from nagios.nagios_logentries;' | mysql -u ndoutils -p'ndoutils_password' nagios
Also I specifically asked if you restarted the nagios service, you showed output from the ndo2db service

Code: Select all

service nagios restart

Re: Consulta Nagvis

Posted: Thu Aug 16, 2018 3:12 pm
by alex3105
The output of the command does not show records:

echo 'select * from nagios.nagios_logentries;' | mysql -u ndoutils -p'ndoutils_password' nagios

If I have restarted the nagios services and ndo2db. It seems strange to me ... I do not know what the problem may be.

Re: Consulta Nagvis

Posted: Thu Aug 16, 2018 3:47 pm
by scottwilkerson
next I would want to see your

Code: Select all

/usr/local/nagios/etc/ndomod.cfg
/usr/local/nagios/etc/ndo2db.cfg
/usr/local/nagios/var/nagios.log

Re: Consulta Nagvis

Posted: Thu Aug 16, 2018 4:30 pm
by alex3105
Dear Scott,

The file nagios.log could not pass it because it contains some sensitive information.

Greetings.