Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #12401] Fixed downtime start does not update actual_start_time #4460

Closed
icinga-migration opened this issue Aug 11, 2016 · 4 comments
Labels
area/db-ido Database output bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by bsheqa on 2016-08-11 08:36:28 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-08-11 10:15:05 +00:00)
Target Version: 2.5.0
Last Update: 2016-08-11 10:15:05 +00:00 (in Redmine)

Icinga Version: v2.4.10-632-ge09fb88
Backport?: Not yet backported
Include in Changelog: 1

When I set a downtime, the DOWNTIME START event is not in the history. DOWNTIME END is displayed correctly.

Steps to reproduce:

  • Schedule a fixed downtime
  • Verify the downtime being scheduled (detail view, downtimes tab)
  • Query the database table icinga_downtimehistory

Attachments

Changesets

2016-08-11 10:10:27 +00:00 by mfriedrich 4109448

DB IDO: Fixed downtime start does not update actual_start_time

fixes #12401
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-08-11 09:46:11 +00:00

  • Subject changed from Downtime Start not in History to Fixed downtime Start not visible in Icinga Web 2 History
  • Description updated

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-08-11 10:07:48 +00:00

  • File added icingaweb2_12401_downtime_fixed_detail.png
  • File added icingaweb2_12401_downtime_fixed_downtime_tab.png
  • File added icingaweb2_12401_downtime_fixed_detail_history_missing.png

The underlying problem is that Icinga Web 2 checks whether actual_start_time is set, but not scheduled_start_time. The column is only update once a downtime is triggered, which is false for fixed downtimes (but true for flexible downtimes).

icingaweb2_12401_downtime_fixed_detail.png

icingaweb2_12401_downtime_fixed_downtime_tab.png

icingaweb2_12401_downtime_fixed_detail_history_missing.png

MariaDB [icinga]> select * from icinga_downtimehistory order by entry_time desc limit 1\G
*************************** 1. row ***************************
    downtimehistory_id: 25
           instance_id: 1
         downtime_type: 2
             object_id: 528
            entry_time: 2016-08-11 11:35:20
           author_name: icingaadmin
          comment_data: fdsfsfsdfsdfd
  internal_downtime_id: 7
       triggered_by_id: 0
              is_fixed: 1
              duration: 0
  scheduled_start_time: 2016-08-11 11:35:16
    scheduled_end_time: 2016-08-11 12:35:16
           was_started: 1
     actual_start_time: 0000-00-00 00:00:00
actual_start_time_usec: 0
       actual_end_time: 0000-00-00 00:00:00
  actual_end_time_usec: 0
         was_cancelled: 0
          is_in_effect: 1
          trigger_time: 0000-00-00 00:00:00
                  name: 12333-host!mbmif.int.netways.de-1470908120-5
    endpoint_object_id: 1
1 row in set (0.00 sec)

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-08-11 10:09:48 +00:00

  • File added icingaweb2_12401_downtime_fixed_detail_history_fixed.png
  • Subject changed from Fixed downtime Start not visible in Icinga Web 2 History to Fixed downtime start does not update actual_start_time
  • Category set to DB IDO
  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 2.5.0

Setting the actual_start_time for fixed downtimes only fixed the core bug. It has been sitting there for quite a while now, so congrats for the finding :)

Fixed output:

MariaDB [icinga]> select * from icinga_downtimehistory order by entry_time desc limit 1\G
*************************** 1. row ***************************
    downtimehistory_id: 28
           instance_id: 1
         downtime_type: 2
             object_id: 528
            entry_time: 2016-08-11 12:06:55
           author_name: icingaadmin
          comment_data: fdsfdrggdfgdf
  internal_downtime_id: 2
       triggered_by_id: 0
              is_fixed: 1
              duration: 0
  scheduled_start_time: 2016-08-11 12:06:52
    scheduled_end_time: 2016-08-11 13:06:52
           was_started: 1
     actual_start_time: 2016-08-11 12:06:52
actual_start_time_usec: 0
       actual_end_time: 0000-00-00 00:00:00
  actual_end_time_usec: 0
         was_cancelled: 0
          is_in_effect: 1
          trigger_time: 0000-00-00 00:00:00
                  name: 12333-host!mbmif.int.netways.de-1470910015-0
    endpoint_object_id: 1
1 row in set (0.00 sec)

icingaweb2_12401_downtime_fixed_detail_history_missing.png

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-08-11 10:15:05 +00:00

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

Applied in changeset 4109448.

@icinga-migration icinga-migration added bug Something isn't working area/db-ido Database output labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.5.0 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/db-ido Database output bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant