-
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
Processor.parser with GROK cannot fully process fields to tags #5339
Comments
I see that with processor.converter I could swap last "ANSWERHOST" to tag type. But I feel that I'd be able to do it with single processor.
|
Part of the solution I could think is to allow processor.parser also to work with tags. Now according to my experiments and documentation it works only with fields. Because why I as a telegraf potential user cannot create new tags from existing tag. There are numerous examples on my world like separating cluster-name from hostname which I all want to be as tags. Doing it via fields is a dirty trick causing a lot of unnecessary processing required. |
Removing this line resolves this issue, but I'm not sure what the consequences are. |
I think in general better option (vs removing this line) would be allow processors.parser to be used also with parse_tags = ["instance"] |
We should switch that check to log a warning at debug level. Any metrics without fields will be removed at the next stage of processing, but since this metric is being merged it will produce a complete metric with fields. |
Relevant telegraf.conf:
System info:
Telegraf unknown (git: master efbc83c)
Steps to reproduce:
I needed to drop on input.exec csv_tag_columns away that parser will process it as it seems to process fields only. My requirement is to process tags as well.
Now parser reads field "instance" and I can grok_patterns it. Uncommented version works but commented-out version does not work. In my scenario "instance"-column contains 100% tags I need to set for influxdb-output.
Expected behavior:
exec,CHASSIS=UTC-KEY-RE1,INSTANCE=V6,NODE=random1.mit.edu,ORIGINHOST=node.orig.realm.net,ORIGINREALM=orig.realm.net,REALM=dest.realm.net,host=na000teleflow1,ANSWERHOST="ans.dest.realm.net" Rejected\ Requests\ In-gress\ Filtering=13i,Incoming\ Answers\ 2xxx=11i,Rejected\ Requests\ Other=14i,Incoming\ Requests=22i,Incoming\ Answers\ UTD=33i,Outgoing\ Answers\ 2xxx=11i,Retransmit\ Requests=99i,
instance="UTC-KEY-RE1-V6 random1.mit.edu orig.realm.net:node.orig.realm.net:dest.realm.net:ans.dest.realm.net",Outgoing\ Answers\ UTD=44i,Incoming\ Answers\ Redirect=55i,Discarded\ Answers=16i,Outgoing\ Answers\ Other=88i,date="2019-01-23-00:00",Outgoing\ Requests=22i,Rejected\ Requests\ Filtering=12i,Outgoing\ Answers\ Redirect=66i,Incoming\ Answers\ Other=77i,Timeout\ Requests=15i 1548201600000000000Actual behavior:
exec,CHASSIS=UTC-KEY-RE1,INSTANCE=V6,NODE=random1.mit.edu,ORIGINHOST=node.orig.realm.net,ORIGINREALM=orig.realm.net,REALM=dest.realm.net,host=na000teleflow1 Rejected\ Requests\ In-gress\ Filtering=13i,Incoming\ Answers\ 2xxx=11i,Rejected\ Requests\ Other=14i,Incoming\ Requests=22i,Incoming\ Answers\ UTD=33i,Outgoing\ Answers\ 2xxx=11i,Retransmit\ Requests=99i,
instance="UTC-KEY-RE1-V6 random1.mit.edu orig.realm.net:node.orig.realm.net:dest.realm.net:ans.dest.realm.net",Outgoing\ Answers\ UTD=44i,Incoming\ Answers\ Redirect=55i,Discarded\ Answers=16i,Outgoing\ Answers\ Other=88i,date="2019-01-23-00:00",Outgoing\ Requests=22i,Rejected\ Requests\ Filtering=12i,Outgoing\ Answers\ Redirect=66i,Incoming\ Answers\ Other=77i,Timeout\ Requests=15i,ANSWERHOST="ans.dest.realm.net" 1548201600000000000if I try to use commented out grok-pattern I get error message
2019-01-24T14:16:11Z E! [processors.parser] could not parse field instance: grok: must have one or more fields
exec,host=na000teleflow1 Outgoing\ Requests=22i,Outgoing\ Answers\ Other=88i,Outgoing\ Answers\ 2xxx=11i,Outgoing\ Answers\ Redirect=66i,Retransmit\ Requests=99i,Rejected\ Requests\ In-gress\ Filtering=13i,Timeout\ Requests=15i,date="2019-01-23-00:00",
instance="UTC-KEY-RE1-V6 random1.mit.edu orig.realm.net:node.orig.realm.net:dest.realm.net:ans.dest.realm.net",Incoming\ Answers\ Redirect=55i,Outgoing\ Answers\ UTD=44i,Incoming\ Answers\ 2xxx=11i,Incoming\ Requests=22i,Incoming\ Answers\ UTD=33i,Rejected\ Requests\ Other=14i,Incoming\ Answers\ Other=77i,Rejected\ Requests\ Filtering=12i,Discarded\ Answers=16i 1548201600000000000Additional info:
The text was updated successfully, but these errors were encountered: