-
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
Support for decimal in timestamps for logparser input #1912
Comments
It should be added as a special timestamp format, similar to how ts-epoch and ts-epochnano are parsed: https://github.com/influxdata/telegraf/blob/master/plugins/inputs/logparser/grok/grok.go#L227 I would call it something like as a workaround, you could parse just the unix epoch part of the timestamp with something like this (throwing away the millisecond precision):
|
@sparrc , why not make an extension to the grok parser so you can "wash" out unwanted charachters similar to logstash´s mutate functionality? , it doesnt feel right having to try change apps - ofteh 3d party apps logging behaviour - often impossible, and right now i cant use telegraf (even though i want to) since i also had the exact similar case in #1649 |
@discoduck2x isn't this what you're looking for? As as I said above, it's simple to ignore the decimals if you'd like:
|
@sparrc that doesnt solve it at all - that makes it so i get second timeresoution , which is just a workaround for non high resolution timewise data , and that wont do it since alot of things especially packetcapture data - or high frequency transactional flows will not suffice with second as timeboundry. We need to be able to get any arbitrary time format -> epoch ms/epoch nano! There is so much out there that you dont have control over and due to how telegraf handles this I have to use other propriatary scripts to get data into influx OR use logstash etc... which,,,,, sucks! I want to use telegraf , i just cant , yet :) |
@discoduck2x it's a workaround, it really wouldn't be difficult at all for someone to fix this with a PR, I think you can understand that I don't have time to accommodate every single request. If you want it prioritized of course you could contact [email protected] ;-) |
@sparrc , but it isnt a workaround, i look for serialization delays for operations that take X microseconds to complete and if say 500 of these arrive on the wire within the same second then having all of them piled up with the same second timestamp wont do me no good...not a workaround. wish i knew some developer who could PR this for me... i totally understand u cant jump the gun on all requests. unfort back to logstash for now. |
oh @njhartwell i didnt see first that you suggested you could hack this up - can you ? im soooo in your debt if you do :) |
@discoduck2x Can you add an example of how this would look in logstash configuration using their mutate functionality? |
@danielnelson sorry for the late reply. here´s how im getting round it currently with logstash (prob not the best way to do it but it works for me): input data: logstash.conf:
which produces the following output:
|
Feature Request
Proposal:
In trying to ingest Apache Traffic Server's squid-formatted log files (using logparser input or influx line protocol), there does not seem to be an easy way to get telegraf to accept millisecond-precision timestamps like
1476680409.042
. I'd be happy to submit a PR if someone could verify that this is a reasonable request and suggest the best way to implement it (e.g. a new input plugin specific to ATS, some extension to the grok parser, etc.).Current behavior:
1476680409.042
is not treated as a valid timestamp.Desired behavior:
1476680409.042
could be parsed as a valid timestamp.Use case:
We make extensive use of Apache Traffic Server (as do lots of people :) ) and having it would be great to be able to parse its access logs natively.
The text was updated successfully, but these errors were encountered: