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

add regex parser #1338

Closed
wants to merge 1 commit into from
Closed

add regex parser #1338

wants to merge 1 commit into from

Conversation

alimousazy
Copy link
Contributor

@alimousazy alimousazy commented Jun 6, 2016

Required for all PRs:

  • CHANGELOG.md updated
  • [ x] Sign CLA (if not already signed)
  • README.md updated (if adding a new plugin)

Add new input parser called REGEX, this will allow for creating metrics from non-formated input stream like raw log file. currently it support two model counting matches or extract value. Counting matches works by counting matches of REGEX and report it as a field, while Extract value use capture group to collect field name and value.

[inputs.tail.regex_expr]
request_type = ["GET", "POST", "PUT"]
request_duration = ["(RequestDuration)=([0-9]+)"]

This will create two metrics, the first one is request_type contain a count for GET, POST and PUT occurrence in the file, the second is request_duration metric which will have one field called RequestDuration with extracted duration from REGEX file

@sparrc
Copy link
Contributor

sparrc commented Jun 7, 2016

thanks for the work @alimousazy but I am currently working on a logparser implementation in PR #1320

@sparrc sparrc closed this Jun 7, 2016
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.

None yet

2 participants