I've followed this doc here http://community.nagios.org/2010/01/16/ ... tallation/
I've taken fresh DB dumps and started replication but it keeps complaining about duplicate entries. Here is a sample output for slave status.
Code: Select all
mysql> show slave status \G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 10.20.120.74
Master_User: slave_user
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: nagios-bin.000008
Read_Master_Log_Pos: 14417469
Relay_Log_File: mysqld-relay-bin.000003
Relay_Log_Pos: 13713140
Relay_Master_Log_File: nagios-bin.000008
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 1062
Last_Error: Error 'Duplicate entry '199' for key 'object_id'' on query. Default database: 'nagios'. Query: 'INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='199', status_update_time=FROM_UNIXTIME(1375206655), output='OK - 10\.20\.103\.2: rta 5\.459ms, lost 0%', long_output='', perfdata='rta=5\.459ms;3000\.000;5000\.000;0; pl=0%;80;100;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='5', last_check=FROM_UNIXTIME(1375206646), next_check=FROM_UNIXTIME(1375206955), check_type='0', last_state_change=FROM_UNIXTIME(1373976463), last_hard_state_change=FROM_UNIXTIME(1372645237), last_hard_state='0', last_time_up=FROM_UNIXTIME(1375206655), last_time_down=FROM_UNIXTIME(1373976393), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_numbe
Skip_Counter: 0
Exec_Master_Log_Pos: 13712994
Relay_Log_Space: 14417917
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 1062
Last_SQL_Error: Error 'Duplicate entry '199' for key 'object_id'' on query. Default database: 'nagios'. Query: 'INSERT INTO nagios_hoststatus SET instance_id='1', host_object_id='199', status_update_time=FROM_UNIXTIME(1375206655), output='OK - 10\.20\.103\.2: rta 5\.459ms, lost 0%', long_output='', perfdata='rta=5\.459ms;3000\.000;5000\.000;0; pl=0%;80;100;;', current_state='0', has_been_checked='1', should_be_scheduled='1', current_check_attempt='1', max_check_attempts='5', last_check=FROM_UNIXTIME(1375206646), next_check=FROM_UNIXTIME(1375206955), check_type='0', last_state_change=FROM_UNIXTIME(1373976463), last_hard_state_change=FROM_UNIXTIME(1372645237), last_hard_state='0', last_time_up=FROM_UNIXTIME(1375206655), last_time_down=FROM_UNIXTIME(1373976393), last_time_unreachable=FROM_UNIXTIME(0), state_type='1', last_notification=FROM_UNIXTIME(0), next_notification=FROM_UNIXTIME(0), no_more_notifications='0', notifications_enabled='1', problem_has_been_acknowledged='0', acknowledgement_type='0', current_notification_numbe
1 row in set (0.00 sec)