Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #2539] add is_in_effect and trigger_time to scheduleddowntime and downtimehistory tables #947

Closed
icinga-migration opened this issue Apr 22, 2012 · 7 comments

Comments

@icinga-migration
Copy link

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

Created by mfriedrich on 2012-04-22 22:58:37 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2012-04-27 17:13:55 +00:00)
Target Version: 1.7
Last Update: 2014-12-08 14:37:41 +00:00 (in Redmine)


requires #2537 to be implemented.

Changesets

2012-04-23 00:06:38 +00:00 by mfriedrich b7a29ac

idoutils: add is_in_effect and trigger_time to scheduleddowntime and downtimehistory tables #2539 - MF

requires change on doing neb callback after
having fetched all necessary data when
starting/triggering a downtime.

all 3 rdbms get scheduleddowntime and
downtimehistory populated.

db sqls and upgrade scripts require tests!

refs #2537
refs #2539

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-22 23:25:06 +00:00

implementing that feature requires that the neb callback happens after the detection of the downtime being entered (trigger_time) as well as setting it to is_in_effect as well.

this could possibly interfere with existing event brokers, but none is allowed to override the downtime being set as this is an internal functionality. change must be noted though.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-23 00:04:33 +00:00

tested with postgresql fow now.

before

| 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 | is_in_effect |      trigger_time
+-------------+---------------+-----------+------------------------+-------------+--------------+----------------------+-----------------+----------+----------+------------------------+------------------------+-------------+------------------------+------------------------+--------------+------------------------
|           1 |             2 |      1366 | 2012-04-23 02:02:08+02 | icinga      | 1            |                   12 |               0 |        0 |      300 | 2012-04-23 02:01:48+02 | 2012-04-23 02:11:48+02 |           0 | 1970-01-01 00:00:00+01 |                      0 |            0 | 1970-01-01 01:00:00+01

triggered

 | 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 | is_in_effect |      trigger_time
-+-------------+---------------+-----------+------------------------+-------------+--------------+----------------------+-----------------+----------+----------+------------------------+------------------------+-------------+------------------------+------------------------+--------------+------------------------
 |           1 |             2 |      1366 | 2012-04-23 02:02:08+02 | icinga      | 1            |                   12 |               0 |        0 |      300 | 2012-04-23 02:01:48+02 | 2012-04-23 02:11:48+02 |           1 | 2012-04-23 02:03:29+02 |                  42560 |            1 | 2012-04-23 02:03:29+02

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-23 00:05:13 +00:00

  • Done % changed from 0 to 80

requires further rdbms tests, more tomorrow.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-23 00:09:09 +00:00

well, first 2 rows did not work, 3 does on the downtimehistory.

 | 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    $
-+-------------+----------------------+----------------------+-----------------+----------+----------+------------------------+------------------------+-------------+------------------------+------------------------+------------------------+----------------------+---------------+--------------+----------------------$
 | icinga      | fsfs                 |                   10 |               0 |        0 |      300 | 2012-04-23 01:00:01+02 | 2012-04-23 01:10:01+02 |           1 | 2012-04-23 01:01:15+02 |                  31406 | 2012-04-23 01:06:22+02 |               902766 |             0 |            1 |
 | icinga      | test my flexible ido |                   11 |               0 |        0 |      300 | 2012-04-23 01:35:33+02 | 2012-04-23 01:45:33+02 |           1 | 2012-04-23 01:38:33+02 |                   4296 | 2012-04-23 01:43:35+02 |               843318 |             0 |            1 | 1970-01-01 01:00:00+01
 | icinga      | 1                    |                   12 |               0 |        0 |      300 | 2012-04-23 02:01:48+02 | 2012-04-23 02:11:48+02 |           1 | 2012-04-23 02:03:29+02 |                  42560 | 1970-01-01 00:00:00+01 |                    0 |             0 |            1 | 2012-04-23 02:03:29+02

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-23 00:09:52 +00:00

diversification on "is_in_effect" is needed, depending on the callback sending data.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-04-27 17:13:55 +00:00

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

for me it looks good.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-12-08 14:37:41 +00:00

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant