[dev.icinga.com #3989] Add a table trimming option for 'downtime history' #1262

Closed
icinga-migration opened this Issue Apr 23, 2013 · 5 comments

Comments

Projects
None yet
1 participant
@icinga-migration
Member

icinga-migration commented Apr 23, 2013

This issue has been migrated from Redmine: https://dev.icinga.com/issues/3989

Created by ossmon on 2013-04-23 12:06:41 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2013-06-22 17:34:14 +00:00)
Target Version: 1.10
Last Update: 2014-12-08 14:38:04 +00:00 (in Redmine)


Implement a trimming option in ido2db.cfg to delete automatically old records from the 'downtime history'

for example: max_downtimehistory_age

Changesets

2013-06-22 17:32:59 +00:00 by (unknown) e5e008f

idoutils: add a table trimming option for 'downtime history'

fixes #3989
@icinga-migration

This comment has been minimized.

Show comment
Hide comment
@icinga-migration

icinga-migration Apr 26, 2013

Member

Updated by mfriedrich on 2013-04-26 16:10:40 +00:00

  • Target Version set to 1.10
Member

icinga-migration commented Apr 26, 2013

Updated by mfriedrich on 2013-04-26 16:10:40 +00:00

  • Target Version set to 1.10
@icinga-migration

This comment has been minimized.

Show comment
Hide comment
@icinga-migration

icinga-migration Jun 22, 2013

Member

Updated by mfriedrich on 2013-06-22 16:56:19 +00:00

  • Category set to 82
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
Member

icinga-migration commented Jun 22, 2013

Updated by mfriedrich on 2013-06-22 16:56:19 +00:00

  • Category set to 82
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
@icinga-migration

This comment has been minimized.

Show comment
Hide comment
@icinga-migration

icinga-migration Jun 22, 2013

Member

Updated by mfriedrich on 2013-06-22 17:32:23 +00:00

Sat Jun 22 19:23:23 2013 .475902 [001.2] [pid=11858] [tid=140469491934976] ido2db_db_query() start
Sat Jun 22 19:23:23 2013 .475913 [002.0] [pid=11858] [tid=140469491934976] DELETE FROM icinga_downtimehistory WHERE instance_id=1 AND entry_time entry_time: 1371921743) end
Sat Jun 22 19:23:23 2013 .539986 [001.2] [pid=11858] [tid=140469491934976] ido2db_db_perform_maintenance() end

setting of 1 minute.

mysql> select * from icinga_downtimehistory;
+--------------------+-------------+---------------+-----------+---------------------+-------------+--------------+----------------------+-----------------+----------+----------+----------------------+---------------------+-------------+---------------------+------------------------+---------------------+----------------------+---------------+--------------+---------------------+
| downtimehistory_id | instance_id | downtime_type | object_id | entry_time          | author_name | comment_data | internal_downtime_id | triggered_by_id | is_fixed | duration | scheduled_start_time | scheduled_end_time  | was_started | actual_start_time   | actual_start_time_usec | actual_end_time     | actual_end_time_usec | was_cancelled | is_in_effect | trigger_time        |
+--------------------+-------------+---------------+-----------+---------------------+-------------+--------------+----------------------+-----------------+----------+----------+----------------------+---------------------+-------------+---------------------+------------------------+---------------------+----------------------+---------------+--------------+---------------------+
|                  5 |           1 |             1 |       474 | 2013-06-22 19:30:17 | icingademo  | ghfhfg       |                   76 |               0 |        1 |       64 |  2013-06-22 19:29:55 | 2013-06-22 19:30:59 |           1 | 2013-06-22 19:30:17 |                 964957 | 0000-00-00 00:00:00 |                    0 |             0 |            1 | 2013-06-22 19:30:17 |
|                  6 |           1 |             1 |       475 | 2013-06-22 19:30:17 | icingademo  | ghfhfg       |                   77 |               0 |        1 |       64 |  2013-06-22 19:29:55 | 2013-06-22 19:30:59 |           1 | 2013-06-22 19:30:18 |                  15955 | 0000-00-00 00:00:00 |                    0 |             0 |            1 | 2013-06-22 19:30:17 |
+--------------------+-------------+---------------+-----------+---------------------+-------------+--------------+----------------------+-----------------+----------+----------+----------------------+---------------------+-------------+---------------------+------------------------+---------------------+----------------------+---------------+--------------+---------------------+
2 rows in set (0.00 sec)

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2013-06-22 19:31:56 |
+---------------------+
1 row in set (0.00 sec)

mysql> select * from icinga_downtimehistory;
Empty set (0.00 sec)
Member

icinga-migration commented Jun 22, 2013

Updated by mfriedrich on 2013-06-22 17:32:23 +00:00

Sat Jun 22 19:23:23 2013 .475902 [001.2] [pid=11858] [tid=140469491934976] ido2db_db_query() start
Sat Jun 22 19:23:23 2013 .475913 [002.0] [pid=11858] [tid=140469491934976] DELETE FROM icinga_downtimehistory WHERE instance_id=1 AND entry_time entry_time: 1371921743) end
Sat Jun 22 19:23:23 2013 .539986 [001.2] [pid=11858] [tid=140469491934976] ido2db_db_perform_maintenance() end

setting of 1 minute.

mysql> select * from icinga_downtimehistory;
+--------------------+-------------+---------------+-----------+---------------------+-------------+--------------+----------------------+-----------------+----------+----------+----------------------+---------------------+-------------+---------------------+------------------------+---------------------+----------------------+---------------+--------------+---------------------+
| downtimehistory_id | instance_id | downtime_type | object_id | entry_time          | author_name | comment_data | internal_downtime_id | triggered_by_id | is_fixed | duration | scheduled_start_time | scheduled_end_time  | was_started | actual_start_time   | actual_start_time_usec | actual_end_time     | actual_end_time_usec | was_cancelled | is_in_effect | trigger_time        |
+--------------------+-------------+---------------+-----------+---------------------+-------------+--------------+----------------------+-----------------+----------+----------+----------------------+---------------------+-------------+---------------------+------------------------+---------------------+----------------------+---------------+--------------+---------------------+
|                  5 |           1 |             1 |       474 | 2013-06-22 19:30:17 | icingademo  | ghfhfg       |                   76 |               0 |        1 |       64 |  2013-06-22 19:29:55 | 2013-06-22 19:30:59 |           1 | 2013-06-22 19:30:17 |                 964957 | 0000-00-00 00:00:00 |                    0 |             0 |            1 | 2013-06-22 19:30:17 |
|                  6 |           1 |             1 |       475 | 2013-06-22 19:30:17 | icingademo  | ghfhfg       |                   77 |               0 |        1 |       64 |  2013-06-22 19:29:55 | 2013-06-22 19:30:59 |           1 | 2013-06-22 19:30:18 |                  15955 | 0000-00-00 00:00:00 |                    0 |             0 |            1 | 2013-06-22 19:30:17 |
+--------------------+-------------+---------------+-----------+---------------------+-------------+--------------+----------------------+-----------------+----------+----------+----------------------+---------------------+-------------+---------------------+------------------------+---------------------+----------------------+---------------+--------------+---------------------+
2 rows in set (0.00 sec)

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2013-06-22 19:31:56 |
+---------------------+
1 row in set (0.00 sec)

mysql> select * from icinga_downtimehistory;
Empty set (0.00 sec)
@icinga-migration

This comment has been minimized.

Show comment
Hide comment
@icinga-migration

icinga-migration Jun 22, 2013

Member

Updated by Anonymous on 2013-06-22 17:34:14 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset icinga-core:e5e008f40a681c67b16e767c0b83f489d838558d.

Member

icinga-migration commented Jun 22, 2013

Updated by Anonymous on 2013-06-22 17:34:14 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset icinga-core:e5e008f40a681c67b16e767c0b83f489d838558d.

@icinga-migration

This comment has been minimized.

Show comment
Hide comment
@icinga-migration

icinga-migration Dec 8, 2014

Member

Updated by mfriedrich on 2014-12-08 14:38:04 +00:00

  • Project changed from 18 to Core, Classic UI, IDOUtils
  • Category changed from 82 to IDOUtils
Member

icinga-migration commented Dec 8, 2014

Updated by mfriedrich on 2014-12-08 14:38:04 +00:00

  • Project changed from 18 to Core, Classic UI, IDOUtils
  • Category changed from 82 to IDOUtils
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment