Assignee: (none)
Status: New
Target Version: (none)
Last Update: 2016-05-24 10:24:06 +00:00 (in Redmine)
Icinga Version: 1.10.3-1
Icinga Web Version: 1.10.0-2
IDO Version: 1.10.3-1
OS Version: ubuntu 14.04
DB Type: MySQL
DB Version: 5.5.49
Browser Version: chrome 50.0.2661.102 m
Hi.
We have duplicate entries in the history of the services. Every change in the state of a service appears double. We are checked in the database and there are 2 entries for every new state (only change the ID of the row).
mysql> select * from icinga_statehistory limit 11;
This issue has been migrated from Redmine: https://dev.icinga.com/issues/11830
Created by vgonzal on 2016-05-24 10:24:06 +00:00
Assignee: (none) Status: New Target Version: (none) Last Update: 2016-05-24 10:24:06 +00:00 (in Redmine)
Hi.
We have duplicate entries in the history of the services. Every change in the state of a service appears double. We are checked in the database and there are 2 entries for every new state (only change the ID of the row).
mysql> select * from icinga_statehistory limit 11;
----------------~~------------
*------------------------------------~~----------*-------------------------------*-----------------------------------------~~-----------*-----------------------------------------------------------------------~~-------------+ | statehistory_id | instance_id | state_time | state_time_usec | object_id | state_change | state | state_type | current_check_attempt | max_check_attempts | last_state | last_hard_state | output | long_output |----------------~~------------
*------------------------------------~~----------*-------------------------------*-----------------------------------------~~-----------*-----------------------------------------------------------------------~~-------------+ | 1 | 1 | 2016-05-03 14:59:59 | 227199 | 172 | 1 | 0 | 1 | 3 | 3 | 1 | 1 | PROCS OK: 2 processes with command name 'ido2db' | (null) | | 2 | 1 | 2016-05-03 17:37:03 | 85753 | 172 | 1 | 1 | 0 | 1 | 3 | 0 | 0 | PROCS WARNING: 3 processes with command name 'ido2db' | (null) | | 3 | 1 | 2016-05-03 17:37:03 | 85753 | 172 | 1 | 1 | 0 | 1 | 3 | 0 | 0 | PROCS WARNING: 3 processes with command name 'ido2db' | (null) | | 4 | 1 | 2016-05-03 17:39:02 | 44234 | 172 | 1 | 2 | 0 | 2 | 3 | 1 | 0 | PROCS CRITICAL: 0 processes with command name 'ido2db' | (null) | | 5 | 1 | 2016-05-03 17:39:02 | 44234 | 172 | 1 | 2 | 0 | 2 | 3 | 1 | 0 | PROCS CRITICAL: 0 processes with command name 'ido2db' | (null) | | 6 | 1 | 2016-05-03 17:40:32 | 224256 | 172 | 1 | 0 | 0 | 3 | 3 | 2 | 0 | PROCS OK: 2 processes with command name 'ido2db' | (null) | | 7 | 1 | 2016-05-03 17:40:32 | 224256 | 172 | 1 | 0 | 0 | 3 | 3 | 2 | 0 | PROCS OK: 2 processes with command name 'ido2db' | (null) | | 8 | 1 | 2016-05-18 17:45:28 | 176187 | 172 | 1 | 1 | 0 | 1 | 3 | 0 | 0 | PROCS WARNING: 3 processes with command name 'ido2db' | (null) | | 9 | 1 | 2016-05-18 17:45:28 | 176187 | 172 | 1 | 1 | 0 | 1 | 3 | 0 | 0 | PROCS WARNING: 3 processes with command name 'ido2db' | (null) | | 10 | 1 | 2016-05-18 17:47:28 | 5257 | 172 | 1 | 1 | 0 | 2 | 3 | 1 | 0 | PROCS WARNING: 3 processes with command name 'ido2db' | (null) | | 11 | 1 | 2016-05-18 17:47:28 | 5257 | 172 | 1 | 1 | 0 | 2 | 3 | 1 | 0 | PROCS WARNING: 3 processes with command name 'ido2db' | (null) |----------------~~------------
*------------------------------------~~----------*-------------------------------*-----------------------------------------~~-----------*-----------------------------------------------------------------------~~-------------+It seems that ido2db are writing two times the events in the tables.
root@mon-test:/var/log/icinga# grep INSERT ido2db.debug |grep logentries|head [1464084071.143659] [002.0] [pid=2324] [tid=140612289472320] INSERT INTO icinga_logentries (instance_id, logentry_time, entry_time, entry_time_usec, logentry_type, logentry_data, realtime_data, inferred_data_extracted) VALUES (1, FROM_UNIXTIME(1464084055), FROM_UNIXTIME(1464084055), '0', 300, 'idomod: Error writing to data sink! Some output may get lost\.\.\.', '1', '1') [1464084071.143912] [002.0] [pid=2324] [tid=140612289472320] INSERT INTO icinga_logentries (instance_id, logentry_time, entry_time, entry_time_usec, logentry_type, logentry_data, realtime_data, inferred_data_extracted) VALUES (1, FROM_UNIXTIME(1464084055), FROM_UNIXTIME(1464084055), '0', 300, 'idomod: Error writing to data sink! Some output may get lost\.\.\.', '1', '1') [1464084071.144093] [002.0] [pid=2324] [tid=140612289472320] INSERT INTO icinga_logentries (instance_id, logentry_time, entry_time, entry_time_usec, logentry_type, logentry_data, realtime_data, inferred_data_extracted) VALUES (1, FROM_UNIXTIME(1464084055), FROM_UNIXTIME(1464084055), '0', 300, 'idomod: Please check remote ido2db log, database connection or SSL Parameters', '1', '1') [1464084071.144281] [002.0] [pid=2324] [tid=140612289472320] INSERT INTO icinga_logentries (instance_id, logentry_time, entry_time, entry_time_usec, logentry_type, logentry_data, realtime_data, inferred_data_extracted) VALUES (1, FROM_UNIXTIME(1464084055), FROM_UNIXTIME(1464084055), '0', 300, 'idomod: Please check remote ido2db log, database connection or SSL Parameters', '1', '1') [1464084071.147222] [002.0] [pid=2324] [tid=140612289472320] INSERT INTO icinga_logentries (instance_id, logentry_time, entry_time, entry_time_usec, logentry_type, logentry_data, realtime_data, inferred_data_extracted) VALUES (1, FROM_UNIXTIME(1464084071), FROM_UNIXTIME(1464084071), '0', 300, 'idomod: Successfully flushed 16 queued items to data sink\.', '1', '1') [1464084071.147421] [002.0] [pid=2324] [tid=140612289472320] INSERT INTO icinga_logentries (instance_id, logentry_time, entry_time, entry_time_usec, logentry_type, logentry_data, realtime_data, inferred_data_extracted) VALUES (1, FROM_UNIXTIME(1464084071), FROM_UNIXTIME(1464084071), '0', 300, 'idomod: Successfully flushed 16 queued items to data sink\.', '1', '1') [1464084071.147613] [002.0] [pid=2324] [tid=140612289472320] INSERT INTO icinga_logentries (instance_id, logentry_time, entry_time, entry_time_usec, logentry_type, logentry_data, realtime_data, inferred_data_extracted) VALUES (1, FROM_UNIXTIME(1464084071), FROM_UNIXTIME(1464084071), '0', 300, 'idomod: Successfully reconnected to data sink! 0 items lost, 16 queued items to flush\.', '1', '1') [1464084071.147825] [002.0] [pid=2324] [tid=140612289472320] INSERT INTO icinga_logentries (instance_id, logentry_time, entry_time, entry_time_usec, logentry_type, logentry_data, realtime_data, inferred_data_extracted) VALUES (1, FROM_UNIXTIME(1464084071), FROM_UNIXTIME(1464084071), '0', 300, 'idomod: Successfully reconnected to data sink! 0 items lost, 16 queued items to flush\.', '1', '1') [1464084163.562348] [002.0] [pid=2324] [tid=140612289472320] INSERT INTO icinga_logentries (instance_id, logentry_time, entry_time, entry_time_usec, logentry_type, logentry_data, realtime_data, inferred_data_extracted) VALUES (1, FROM_UNIXTIME(1464084163), FROM_UNIXTIME(1464084163), '0', 300, 'EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;localhost;ido2db Process;2;', '1', '1') [1464084163.562722] [002.0] [pid=2324] [tid=140612289472320] INSERT INTO icinga_logentries (instance_id, logentry_time, entry_time, entry_time_usec, logentry_type, logentry_data, realtime_data, inferred_data_extracted) VALUES (1, FROM_UNIXTIME(1464084163), FROM_UNIXTIME(1464084163), '0', 300, 'EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;localhost;ido2db Process;2;', '1', '1')
How can I correct this problem?
Thank you in advance.