-
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
Telegraf not able to process datetime received from SNMP Input plugin #12456
Comments
Telegraf is translating those values to a string, which is why it comes out looking strange. If you need to parse these values according to that spec then you might try using the starlark processor to read each part and produce the datetime string as you expect. |
Hello! I recommend posting this question in our Community Slack or Community Page, we have a lot of talented community members there who could help answer your question more quickly. You can also learn more about Telegraf by enrolling at InfluxDB University for free! Heads up, this issue will be automatically closed after 7 days of inactivity. Thank you! |
Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Page. Thank you! |
still an Error. pls Cover the Issue. |
Encountered the same problem, have you solved it? |
@gkloss @houm01 @Dhyanesh97 Have a look at my PR #15439 which will enable you to parse this value using Starlark script. The value will now be presented as a hex string without loss of information. |
Also have a look at #15935 which will enable the snmp plugin to directly format it according to the display hint format in the MIB. |
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf:1.24, Ubuntu 20.04, Docker version 20.10.18
Docker
No response
Steps to reproduce
...
Expected behavior
Data should be inserted in datetime or string format in influxdb
Actual behavior
It is treating it as junk character which we are not able to handle properly.
Additional info
Date format from source end look like 1992-5-26,13:30:15.0,-4:0
A date-time specification.
field octets contents range
1 1-2 year 0..65536
2 3 month 1..12
3 4 day 1..31
4 5 hour 0..23
5 6 minutes 0..59
6 7 seconds 0..60
(use 60 for leap-second)
7 8 deci-seconds 0..9
8 9 direction from UTC '+' / '-'
9 10 hours from UTC 0..11
10 11 minutes from UTC 0..59
For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be
displayed as:
Note that if only local time is known, then timezone
information (fields 8-10) is not present.
The text was updated successfully, but these errors were encountered: