Page 1 of 1

ndo2db ignores db_host setting

Posted: Fri Jun 02, 2017 5:07 am
by marcello87
Hi,

i've made an ndo2db installation with an external mysql server.

Both systems are debian 7.

I got no data in the DB, and got errors in the nagios.log an var/log/messages.
Normal CLI login from nagios server work fine!

Nagios.log

Code: Select all

[1496391660] ndomod: NDOMOD 2.1.3 (2017-04-13) Copyright (c) 2009 Nagios Core Development Team and Community Contributors
[1496391660] ndomod: Successfully connected to data sink.  5000 queued items to flush.
[1496391660] ndomod: Error writing to data sink!  Some output may get lost.  4808 queued items to flush.
[1496391660] ndomod registered for process data
...
Here is an bug, wrong DB server, but why?
/var/log/messages

Code: Select all

Jun  2 11:40:18 vm-monitoring ndo2db: Error: Could not connect to MySQL database: Host [b]'vm-monitoring.local[/b]' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
Jun  2 11:40:18 vm-monitoring ndo2db: Error: Could not connect to MySQL database: Host '[b]vm-monitoring.local[/b]' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
My ndo2db.cfg:

Code: Select all

instance_name=default
output_type=unixsocket
output=/usr/local/nagios/var/ndo.sock
tcp_port=5668
db_host=[b]vm-partnermonitoring[/b]
use_ssl=0
output_buffer_items=5000
buffer_file=/usr/local/nagios/var/ndomod.tmp
file_rotation_interval=14400
file_rotation_timeout=60
reconnect_interval=15
reconnect_warning_interval=15
Where he got the wrong "db_host" information???

I try also ndo2db stop/start and omd reload, no change to get the right db_host adress :(

No more ideas :(

Re: ndo2db ignores db_host setting

Posted: Fri Jun 02, 2017 10:04 am
by avandemore
The DB connection information is generally stored in the file ndo2db.cfg, not ndomod.cfg. Is that that your confusion?

Re: ndo2db ignores db_host setting

Posted: Fri Jun 02, 2017 11:46 am
by marcello87
Hi avandemore,

thanks for your answer.

I found my mistake now :?

I have the same login for linux and mysql on both systems.

Mysql don't accept this login because it's also there as 'nagios'@'localhost' an 'nagios'@'vm-monitoring'.

I found an hint on a other topic.

Now i generate an new login an it works, thanks!


Topic can be closed...