-
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
Added filename tag to tail input plugin. #4292
Conversation
plugins/inputs/tail/tail.go
Outdated
t.acc.AddFields(m.Name(), m.Fields(), m.Tags(), m.Time()) | ||
if m != nil { | ||
tags := m.Tags() | ||
tags["filename"] = tailer.Filename |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change the name of this tag to path
? This will just be more consistent with the logparser input, and I hope to combine these plugins at some point.
b6e0673
to
daff426
Compare
Hello @danielnelson , it seems that circleci deps check failed due to operational failure. Would you please re-run check or should I make additional commit to rerun this? |
@wingsof If you can merge/rebase against our master to get the new CircleCI build image it should resolve this issue. |
…r consistency with logparser input plugin.
daff426
to
a21251c
Compare
tag name changed to 'path' =-) and would you share your plan about merging tail and logparser plugin? I was planning to implement capture log from newly created file while telegraf running, but if tail plugin will be merged eventually, maybe I can check logparser plugin first. |
What we would like to do is make the grok parser in the logparser plugin available as a first class parser available to all plugins that support the Once this is done then tail will be able to do everything that logparser can do, and there will no longer be a need to have both plugins. |
* origin: (39 commits) Document path tag in tail input Update changelog Added path tag to tail input plugin (influxdata#4292) Run windows tests with -short Fix postfix input handling of multi-level queues (influxdata#4333) Update changelog Add support for comma in logparser timestamp format (influxdata#4311) Update vendoring to dep from gdm (influxdata#4314) Update changelog Add new measurement with results of pgrep lookup to procstat input (influxdata#4307) Update changelog Add valuecounter aggregator plugin (influxdata#3523) Update changelog Update docker input documentation for container status Add container status tag to docker input (influxdata#4259) Drop CI support for Go 1.8 (influxdata#4309) Update changelog Fix selection of tags under nested objects in the JSON parser (influxdata#4284) Update changelog Add owner tag on partitions in burrow input (influxdata#4281) ...
Does that mean we will be finaly able to use Grok parser for gathering metrices from the |
@danielnelson That's great! Thanks! |
Ouch, just noticed this change and now our data is being "polluted" with an extra tag that has no value for us... I understand this can be a very useful feature (so, thanks! :-)), but considering how much of a pain it can be to change tags in influx, it might be better to have it as an optional / opt-in /configurable feature? |
@dirkdevriendt That's not a bad idea, in the meantime you can use |
Thanks @glinton! |
I'd like to see same path-added to input.file too! Because if I glob there I want to be able set measurement name by filename-prefix.. I think every input.* which are doing wildcards or globbing should have tag-option or variable which could be used like: |
Required for all PRs:
Added filename tag for tail input plugin.
This information is needed when the case telegraf captures log from multiple files in the directory structure and there's a need to identify source.