-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Issue with 'win_eventlog' plugin timestamp precision #8204
Comments
I think this is intentional, though I'm not sure if it's the right thing to do or not. It's not unusual for inputs to use the timestamp from when they were collected, which can be useful. Since these events have timestamps, though, I can see why it would make sense to use those as well. The change is pretty simple.. parse the time out of the TimeCreated field, and pass it to addFields, eg thoughts @simnv ? |
@ssoroka @FramnkRulez. I see the point, will add this with a config switch. |
I've been testing the new 'win_eventlog' plugin in 1.16.0 and I've noticed an issue with timestamp precision when writing to a json file. In the attached config, json is configured for microsecond precision but output entries are rounded to the nearest minute
Relevant telegraf.conf:
System info:
Steps to reproduce:
Expected behavior:
Expected timestamp to match the "TimeCreated" field from Windows log entries.
Actual behavior:
Timestamp in output is rounded to nearest minute
Additional info:
Here's an example entry from the output json, note that the 'TimeCreated' for the event log entry is 2020-09-30T14:37:03.935143900Z but the recorded timestamp in the output is 1601476680000000 which is actually rounded to 2020-09-30T14:38:00.000000000Z (almost a minute off the actual event time).
The text was updated successfully, but these errors were encountered: