diff --git a/doc/80-Upgrading.md b/doc/80-Upgrading.md index c313fb485..5cf22e0c9 100644 --- a/doc/80-Upgrading.md +++ b/doc/80-Upgrading.md @@ -3,6 +3,16 @@ Specific version upgrades are described below. Please note that upgrades are incremental. An upgrade from v2.6 to v2.8 requires to follow the instructions for v2.7 too. +## Upgrading to Icinga Web 2.13 + +**Breaking changes** + +* The following columns of the `Servicestatus` table, which previously displayed the date time (string) as a fetched value, now display the unix timestamp to support relative time filters: + * `service_last_time_ok` + * `service_last_time_unknown` + * `service_last_time_warning` + * `service_last_time_critical` + ## Upgrading to Icinga Web 2.12.2 **Framework changes affecting third-party code** diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php index fafa03be8..b40ae10a8 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicestatusQuery.php @@ -202,10 +202,10 @@ class ServicestatusQuery extends IdoQuery 'service_last_notification' => 'UNIX_TIMESTAMP(ss.last_notification)', 'service_last_state_change' => 'UNIX_TIMESTAMP(ss.last_state_change)', 'service_last_state_change_ts' => 'ss.last_state_change', - 'service_last_time_critical' => 'ss.last_time_critical', - 'service_last_time_ok' => 'ss.last_time_ok', - 'service_last_time_unknown' => 'ss.last_time_unknown', - 'service_last_time_warning' => 'ss.last_time_warning', + 'service_last_time_critical' => 'UNIX_TIMESTAMP(ss.last_time_critical)', + 'service_last_time_ok' => 'UNIX_TIMESTAMP(ss.last_time_ok)', + 'service_last_time_unknown' => 'UNIX_TIMESTAMP(ss.last_time_unknown)', + 'service_last_time_warning' => 'UNIX_TIMESTAMP(ss.last_time_warning)', 'service_long_output' => 'ss.long_output', 'service_max_check_attempts' => 'ss.max_check_attempts', 'service_modified_service_attributes' => 'ss.modified_service_attributes',