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 »

If it is started ..


Greetings
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Consulta Nagvis

Post by scottwilkerson »

alex3105 wrote:If it is started ..


Greetings
Huh?
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Consulta Nagvis

Post 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...
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Consulta Nagvis

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Consulta Nagvis

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Consulta Nagvis

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Consulta Nagvis

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Consulta Nagvis

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Consulta Nagvis

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Consulta Nagvis

Post by alex3105 »

Dear Scott,

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

Greetings.
Attachments
ndomod.cfg
(4.99 KiB) Downloaded 255 times
ndo2db.cfg
(6.02 KiB) Downloaded 246 times
Locked