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 #13607] Displayed times messed up in Icinga Web 2.4.0 w/ PostgreSQL #2651
Comments
Updated by mj84 on 2016-12-15 10:33:10 +00:00 I'm sorry, this does NOT belong to JavaScript, the times off by an hour are also in the data being loaded from the server |
Updated by elippmann on 2016-12-15 10:34:44 +00:00 Hi, Which time zone is configured in your preferences? Best regards, |
Updated by elippmann on 2016-12-15 10:35:39 +00:00 Sorry, I missed your second sentence! |
Updated by elippmann on 2016-12-15 10:36:23 +00:00 Which database backend and which Icinga 2 version are you using? |
Updated by mj84 on 2016-12-15 10:47:28 +00:00 I am using PostgreSQL as backend with Icinga 2.6.0 |
Updated by elippmann on 2016-12-15 10:49:28 +00:00 Do you have a cookie named icingaweb2-tzo? If so, please post its content. |
Updated by elippmann on 2016-12-15 10:50:10 +00:00
|
Updated by mj84 on 2016-12-15 10:53:00 +00:00 I have this cookie: |
Updated by elippmann on 2016-12-15 11:00:08 +00:00 @mj84 What do you mean w/ "the times off by an hour are also in the data being loaded from the server" ? |
Updated by elippmann on 2016-12-15 11:01:57 +00:00 Could you guys please add &format=json to the URL of a detail view where the timestamps are wrong and post the output please. |
Updated by mj84 on 2016-12-15 11:08:35 +00:00 This is the requested JSON: I can see that the timestamps which are off by an hour are already included in the HTML when refreshing a view: |
Updated by elippmann on 2016-12-15 11:24:30 +00:00 Thanks for the output. Did you run the schema upgrade? You can verify this by running SELECT * FROM icinga_dbversion It should yield 1.14.2 in the version field. The timestamp in the database seems wrong. |
Updated by mj84 on 2016-12-15 11:29:34 +00:00
|
Updated by elippmann on 2016-12-15 11:50:05 +00:00 Could you please run another query. Replace host_name and service_description w/ your names. SELECT * FROM icinga_servicestatus s INNER JOIN icinga_objects o ON s.service_object_id = o.object_id WHERE o.objecttype_id = 2 AND o.name1 = host_name AND o.name2 = service_description |
Updated by mj84 on 2016-12-15 12:05:23 +00:00 The timestamps in the DB look fine to me: @ servicestatus_id | instance_id | service_object_id | status_update_time | output | long_output | perfdata | check_source | current_state | has_been_checked | should_be_scheduled | current_check_attempt | max_check_attempts | last_check | next_check | check_type | last_state_change | last_hard_state_change | last_hard_state | last_time_ok | last_time_warning | last_time_unknown | last_time_critical | state_type | last_notification | next_notification | no_more_notifications | notifications_enabled | problem_has_been_acknowledged | acknowledgement_type | current_notification_number | passive_checks_enabled | active_checks_enabled | event_handler_enabled | flap_detection_enabled | is_flapping | percent_state_change | latency | execution_time | scheduled_downtime_depth | failure_prediction_enabled | process_performance_data | obsess_over_service | modified_service_attributes | event_handler | check_command | normal_check_interval | retry_check_interval | check_timeperiod_object_id | is_reachable | endpoint_object_id | original_attributes | object_id | instance_id | objecttype_id | name1 | name2 | is_active |
Updated by elippmann on 2016-12-15 13:44:15 +00:00 Could you please run the following command in PostgreSQL and retest w/ check now. ALTER DATABASE icinga2 SET timezone TO 'UTC'; |
Updated by mj84 on 2016-12-15 14:14:13 +00:00 This did not change anything for me. |
Updated by elippmann on 2016-12-15 15:11:50 +00:00
|
Updated by mfriedrich on 2017-01-12 15:07:14 +00:00
This problem requires 2 fixes:
This solves the majority of timestamp representation in the Icinga Web 2 views. The second fix requires a patch in Icinga Web 2.
This solves the problem that the Monitoring Health view tells you that the data is outdated. "is_currently_running" is evaluated as such. The query can be extracted from http://localhost/icingaweb2/monitoring/health/info?format=sql
@eric |
Updated by elippmann on 2017-01-13 08:59:42 +00:00 Thanks for the information and proper fix Michael. |
This fixes the "monitoring health" view indicating that Icinga 2 isn't updating the database, even if status_update_time uptodate. refs #2651 Signed-off-by: Eric Lippmann <eric.lippmann@icinga.com>
This issue has been migrated from Redmine: https://dev.icinga.com/issues/13607
Created by mj84 on 2016-12-15 10:30:20 +00:00
Assignee: (none)
Status: New
Target Version: 2.4.1
Last Update: 2017-01-13 08:59:42 +00:00 (in Redmine)
Hello,
after upgrading my Icinga Web 2 installation to 2.4.0, I've experienced an issue regarding the displayed times, such as state duration and the time of the next check.
My Browser timezone is set to Europe/Berlin, same goes for PHP and the user options in Icinga Web 2.
However, when I issue the "check now" command to any of my hosts or services, I can see the following:
Last check 60m 4s ago
Next check at 12:28 (my default check interval is 5 min, so it always displays the current time + 65 minutes)
So for some reason, all these times are off by an hour into the future.
I suspect that this might be a JavaScript related issue, since when I reschedule a check, I can see a correct timestamp in Icinga2's logfile.
Regards,
Markus
Changesets
2017-01-12 15:05:29 +00:00 by mfriedrich 9148099
Relations:
The text was updated successfully, but these errors were encountered: