Page 4 of 7
Re: All mysql nagios tables are Empty
Posted: Thu Feb 05, 2015 9:50 am
by deepak_symphony
lnx0202:root# mysql -h 10.106.10.197 -u nagios -pnagios
ERROR 1045 (28000): Access denied for user 'nagios'@'lnx0202.ch3.prod.i.com' (using password: YES)
lnx0202:root#
Re: All mysql nagios tables are Empty
Posted: Thu Feb 05, 2015 4:03 pm
by lmiltchev
I believe you need to log in mysql on the remote box (10.106.10.197):
and run:
Code: Select all
GRANT ALL ON nagios.* TO nagios@'<IP_OF_NAGIOS_SERVER>' IDENTIFIED BY 'nagios';
\q
Then test the remote access from the nagios server:
Code: Select all
mysql -u nagios -p'nagios' -h 10.106.10.197
Re: All mysql nagios tables are Empty
Posted: Thu Feb 05, 2015 9:50 pm
by deepak_symphony
Made changes: But Still same all tables empty:
mysql -u nagios -p'nagios' -h 10.106.10.197
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 5.1.66 Source distribution
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
------------------------------------------------------------------------------------------
Logs:
Feb 5 20:15:23 lnx0202 nagios: ndomod: Still unable to connect to data sink. 0 items lost, 1070 queued items to flush.
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63405->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63405->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63406->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63406->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63407->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63407->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63408->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63408->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63409->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63409->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63409->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63409->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63409->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63409->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63409->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63409->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63409->[10.106.10.197]
Feb 5 20:15:28 lnx0202 snmpd[1833]: Connection from UDP: [171.74.58.58]:63409->[10.106.10.197]
Feb 5 20:15:39 lnx0202 nagios: ndomod: Still unable to connect to data sink. 0 items lost, 1260 queued items to flush.
Feb 5 20:15:56 lnx0202 nagios: ndomod: Still unable to connect to data sink. 0 items lost, 1407 queued items to flush.
Feb 5 20:16:12 lnx0202 nagios: ndomod: Still unable to connect to data sink. 0 items lost, 1519 queued items to flush.
Feb 5 20:16:29 lnx0202 nagios: ndomod: Successfully connected to data sink. 1655 queued items to flush.
Feb 5 20:16:29 lnx0202 nagios: ndomod: Successfully flushed 1655 queued items to data sink
Re: All mysql nagios tables are Empty
Posted: Thu Feb 05, 2015 9:52 pm
by deepak_symphony
And debug file is empty..
Re: All mysql nagios tables are Empty
Posted: Fri Feb 06, 2015 3:38 pm
by abrist
deepak_symphony wrote:And debug file is empty..
Did you restart ndo2db after making the debug changes?
Can you post the current contents of ndo2db.cfg and ndomod.cfg?
Re: All mysql nagios tables are Empty
Posted: Sun Feb 08, 2015 9:36 pm
by deepak_symphony
Yes Restarted the ndo2db.
Here are the details:
lnx0202:root# egrep -v "^#|^$" ndomod.cfg
instance_name=default
output_type=unixsocket
output=/usr/local/nagios/var/ndo.sock
tcp_port=5668
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
data_processing_options=-1
acknowledgement_data=1
adaptive_contact_data=1
adaptive_host_data=1
adaptive_program_data=1
adaptive_service_data=1
aggregated_status_data=1
comment_data=1
contact_status_data=1
downtime_data=1
event_handler_data=1
external_command_data=1
flapping_data=1
host_check_data=1
host_status_data=1
log_data=1
main_config_data=1
notification_data=1
object_config_data=1
process_data=1
program_status_data=1
retention_data=1
service_check_data=1
service_status_data=1
statechange_data=1
system_command_data=1
timed_event_data=1
config_output_options=2
-------------------------------------------------------------
lnx0202:root# egrep -v "^#|^$" ndo2db.cfg
lock_file=/usr/local/nagios/var/ndo2db.lock
ndo2db_user=nagios
ndo2db_group=nagios
socket_type=unix
socket_name=/usr/local/nagios/var/ndo.sock
tcp_port=5668
use_ssl=0
db_servertype=mysql
db_host=localhost
db_port=3306
db_name=nagios
db_prefix=nagios_
db_user=nagios
db_pass=nagios
max_timedevents_age=1440
max_systemcommands_age=10080
max_servicechecks_age=10080
max_hostchecks_age=10080
max_eventhandlers_age=44640
max_externalcommands_age=44640
max_notifications_age=44640
max_contactnotifications=44640
max_contactnotificationmethods=44640
max_logentries_age=129600
max_acknowledgements_age=44640
debug_level=2
debug_verbosity=2
debug_file=/usr/local/nagios/var/ndo2db.debug
max_debug_file_size=1000000
Re: All mysql nagios tables are Empty
Posted: Mon Feb 09, 2015 1:47 pm
by tgriep
On the first page, in the ndo2db.cfg file, the db_host is defined as below.
But the latest ndo2db.cfg file that you posted, it is shown as
What is the IP address of the MYSQL server?
Re: All mysql nagios tables are Empty
Posted: Wed Feb 11, 2015 9:48 pm
by deepak_symphony
Hi,
Its IP address of localhost.
Re: All mysql nagios tables are Empty
Posted: Thu Feb 12, 2015 4:23 am
by deepak_symphony
Both are same instead of IP address, provided localhost and tried.
Re: All mysql nagios tables are Empty
Posted: Thu Feb 12, 2015 9:25 am
by scottwilkerson
You need to go back to setting
then restart ndo2db