Project

General

Profile

Actions

User story #4708

closed

Display time of reports in the web interface in the server timezone

Added by Jonathan CLARKE about 10 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
2
Assignee:
-
Category:
Web - Nodes & inventories
Target version:
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Checked
Regression:

Description

I have a server in CET and a node in CDT. These two timezones have 6 hours difference.

The logs generated on my node look like this:

Mar 30 09:26:12 Message forwarded from sovma136: rudder[512100]: R: @@Common@@log_info@@hasPolicyServer-root@@common-root@@11@@common@@EndRun@@2014-03-30 14:26:00+00:00##f5b7b567-de02-0000-02c0-a8fd88000000@#End execution

As you can see, the time inside the Rudder report is 5 hours ahead of the time in the syslog timestamp. That timestamp comes from the node (it is in CDT).

Our rsyslog config uses that timestamp (from the node!) to insert a line into our PSQL DB:

$template RudderReportsFormat,"insert into RudderSysEvents (executionDate, ...) values ('%timereported:::date-rfc3339%',... )",stdsql

The rsyslog property timereported is defined as follows:

timestamp from the message. Resolution depends on what was provided in the message (in most cases, only seconds)

However, I don't think we should be trusting the time reported by the node (it could be completely out of sync, or worse, lying!), and I don't think we should be using it because we can't know what timezone it's in.

This does not seem to affect reporting, because I think reporting uses the middle field (the time inside the report).

So, I see two solutions:

  1. We change rsyslog to insert the timegenerated (defined as "timestamp when the message was RECEIVED"), and then the display will always be in our local timezone. I don't like this solution, because it means that if logs were delayed (due to unavailable netork or whatever), they will all suddenly appear with the same timestamp, which can be very misleading.
  2. We change the webapp to display the time from the reports field, rather than the syslog time.

I prefer solution 2, but it begs the question: why would be storing the other timestamp too? Maybe we should rename that a "time report received" information that could be useful in advanced debugging or future use?

Thoughts and opinions?


Files

clipboard-202004272303-ibmyd.png (22.6 KB) clipboard-202004272303-ibmyd.png François ARMAND, 2020-04-27 23:03

Related issues 5 (0 open5 closed)

Related to Rudder - Question #5272: Time synchronization is required for reporting ?ResolvedActions
Related to Rudder - Bug #5768: Document how to configure your timezone in rudder webappResolvedActions
Related to Rudder - Bug #7092: Include Timezone in Node InfoReleasedVincent MEMBRÉActions
Related to Rudder - User story #7093: Include Timezone in InventoryReleasedBenoît PECCATTE2016-10-18Actions
Related to Rudder - Bug #8989: Epoch is used for inventory date when inventory is brokenResolvedActions
Actions #1

Updated by Nicolas CHARLES almost 10 years ago

  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE

I'm not sure I'm following you on this one.
The time we use is the one reported by the node, in the reports (in your case, 2014-03-30 14:26:00+00:00), the other one is never used by compliance report (and is not meant to be displayed)
Are you saying that we display the wrong report time???

Actions #2

Updated by Nicolas CHARLES almost 10 years ago

Ha. I guess I understand your question. The time we display in the reports is indeed the syslog time; the idea was to now how long were each command execution, and detect from the webapp potential lags.
Couldn't we simply use the syslog time, but get the timezone from the execution time ?

Actions #3

Updated by Vincent MEMBRÉ almost 10 years ago

  • Target version changed from 2.6.13 to 2.6.14
Actions #4

Updated by Jonathan CLARKE almost 10 years ago

  • Target version changed from 2.6.14 to 2.6.16
Actions #5

Updated by Jonathan CLARKE almost 10 years ago

  • Target version changed from 2.6.16 to 2.6.17
Actions #6

Updated by Nicolas PERRON over 9 years ago

  • Target version changed from 2.6.17 to 2.6.18
Actions #7

Updated by Matthieu CERDA over 9 years ago

  • Target version changed from 2.6.18 to 2.6.19
Actions #8

Updated by Vincent MEMBRÉ over 9 years ago

  • Target version changed from 2.6.19 to 2.6.20
Actions #9

Updated by François ARMAND about 9 years ago

  • Target version changed from 2.6.20 to 2.10.10

This is much more important than the attention we gave it for now.

Actions #10

Updated by Vincent MEMBRÉ about 9 years ago

  • Target version changed from 2.10.10 to 2.10.11
Actions #11

Updated by Vincent MEMBRÉ about 9 years ago

  • Target version changed from 2.10.11 to 2.10.12
Actions #12

Updated by Vincent MEMBRÉ about 9 years ago

  • Target version changed from 2.10.12 to 2.10.13
Actions #13

Updated by Vincent MEMBRÉ about 9 years ago

  • Target version changed from 2.10.13 to 2.10.14
Actions #14

Updated by Benoît PECCATTE almost 9 years ago

  • Assignee changed from Jonathan CLARKE to Nicolas CHARLES

I think the timezone we use for display should be configurable :
- I manage this datacenter from my workplace: I want the timezone to be mine
- I manage hundreds of hosts over the net: I want the timezone to be local to the host to know if it failed durong night or day

The time we store should ideally be UTC.

As for should it be the time it was sent (trust the node) or the time it was received (trust the server) it is an entirely different question and should be managed by a different setting.

Actions #15

Updated by Vincent MEMBRÉ almost 9 years ago

  • Target version changed from 2.10.14 to 2.10.15
Actions #16

Updated by Vincent MEMBRÉ almost 9 years ago

  • Target version changed from 2.10.15 to 2.10.16
Actions #17

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.10.16 to 2.10.17
Actions #18

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.10.17 to 2.10.18
Actions #19

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.10.18 to 2.10.19
Actions #20

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.10.19 to 2.10.20
Actions #21

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.10.20 to 2.11.18
Actions #22

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 2.11.18 to 2.11.19
Actions #23

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 2.11.19 to 2.11.20
Actions #24

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 2.11.20 to 2.11.21
Actions #25

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 2.11.21 to 2.11.22
Actions #26

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 2.11.22 to 2.11.23
Actions #27

Updated by François ARMAND almost 8 years ago

  • Related to Bug #7092: Include Timezone in Node Info added
Actions #28

Updated by François ARMAND almost 8 years ago

Actions #29

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 2.11.23 to 2.11.24
Actions #30

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 2.11.24 to 308
Actions #31

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 308 to 3.1.14
Actions #32

Updated by François ARMAND over 7 years ago

  • Related to Bug #8989: Epoch is used for inventory date when inventory is broken added
Actions #33

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.14 to 3.1.15
Actions #34

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.15 to 3.1.16
Actions #35

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.16 to 3.1.17
Actions #36

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.17 to 3.1.18
Actions #37

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.18 to 3.1.19
Actions #38

Updated by Benoît PECCATTE about 7 years ago

  • Tracker changed from Bug to User story
  • Subject changed from Time of reports appears in the web interface in the timezone local to the node instead of the server to Display time of reports in the web interface in the server timezone
Actions #39

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.19 to 3.1.20
Actions #40

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 3.1.20 to 3.1.21
Actions #41

Updated by Vincent MEMBRÉ almost 7 years ago

  • Target version changed from 3.1.21 to 3.1.22
Actions #42

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 3.1.22 to 3.1.23
Actions #43

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 3.1.23 to 3.1.24
Actions #44

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 3.1.24 to 3.1.25
Actions #45

Updated by Benoît PECCATTE over 6 years ago

  • Target version changed from 3.1.25 to 4.1.9
Actions #46

Updated by Vincent MEMBRÉ over 6 years ago

  • Target version changed from 4.1.9 to 4.1.10
Actions #47

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.1.10 to 4.1.11
Actions #48

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.1.11 to 4.1.12
Actions #49

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 4.1.12 to 4.1.13
Actions #50

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 4.1.13 to 4.1.14
Actions #51

Updated by Benoît PECCATTE over 5 years ago

  • Target version changed from 4.1.14 to 4.1.15
Actions #52

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 4.1.15 to 4.1.16
Actions #53

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 4.1.16 to 4.1.17
Actions #54

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 4.1.17 to 4.1.18
Actions #55

Updated by Vincent MEMBRÉ over 5 years ago

  • Target version changed from 4.1.18 to 4.1.19
Actions #56

Updated by Alexis Mousset about 5 years ago

  • Target version changed from 4.1.19 to 4.1.20
Actions #57

Updated by Alexis Mousset almost 5 years ago

  • Target version changed from 4.1.20 to 588
Actions #58

Updated by Alexis Mousset almost 5 years ago

  • Target version changed from 588 to 5.0.13

It has not changed, we might need to pay attention to this for 5.1 reporting

Actions #59

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.13 to 5.0.14
Actions #60

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.14 to 5.0.15
Actions #61

Updated by Vincent MEMBRÉ over 4 years ago

  • Target version changed from 5.0.15 to 5.0.16
Actions #62

Updated by Alexis Mousset about 4 years ago

  • Target version changed from 5.0.16 to 5.0.17
Actions #63

Updated by Vincent MEMBRÉ about 4 years ago

  • Target version changed from 5.0.17 to 5.0.18
Actions #64

Updated by Benoît PECCATTE almost 4 years ago

  • Target version changed from 5.0.18 to 6.2.0~beta1
Actions #65

Updated by François ARMAND almost 4 years ago

Technical log now have both the run date/time and each reports written in RFC3339 format

Actions #66

Updated by François ARMAND over 3 years ago

  • Fix check set to Checked
Actions

Also available in: Atom PDF