Skip to content
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

allow measurement to be defined for logparser_grok plugin #1434

Closed
wants to merge 1 commit into from

Conversation

nathanielc
Copy link
Contributor

Allows the logparser plugin to define the measurement for the data. I know that normally this is not configurable but it seems to make sense for the logparser plugin as what is being parsed can vary significantly. Also this is the only way to separate data from multiple instances of the plugin.

New example config:

[[inputs.logparser]]
   files = ["/var/lib/pmacct/in_port.txt"]
   from_beginning = true
   [inputs.logparser.grok]
     measurement = "net_in_port"
     patterns = ["%{NONNEGINT:port:tag},%{NONNEGINT:packets:int},%{NONNEGINT:bytes:int}"]

[[inputs.logparser]]
   files = ["/var/lib/pmacct/out_port.txt"]
   from_beginning = true
   [inputs.logparser.grok]
     measurement = "net_out_port"
     patterns = ["%{NONNEGINT:port:tag},%{NONNEGINT:packets:int},%{NONNEGINT:bytes:int}"]
  • CHANGELOG.md updated
  • README.md updated (if adding a new plugin)

@sparrc
Copy link
Contributor

sparrc commented Jul 16, 2016

looks good but you need to run go fmt and add something to the sampleConfig as well

@toni-moreno
Copy link
Contributor

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants