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

re-worked lowercase into a generic strings processor #4476

Merged
merged 6 commits into from
Sep 5, 2018

Conversation

ada-foss
Copy link
Contributor

I'm re-opening this as a new pull request because I've rebased to clean up the history and don't see a way to update the original pull request. This is the implementation of the strings processor we've been talking about in pull request #3890.

Required for all PRs:

  • Signed CLA.
  • Associated README.md updated.
  • Has appropriate unit tests.


### Example Input:
```
iis_log,method=get,uri_stem=/API/HealthCheck cs-host="MIXEDCASE_host",referrer="-",ident="-",http_version=1.1,agent="UserAgent",resp_bytes=270i 1519652321000000000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this also works if the input method=GET? If so, update example input

tag = "method"

[[processors.strings.uppercase]]
key = "cs-host"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be tag or field?


type converter struct {
Tag string
Field string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run gofmt -w ./plugins/processors/strings; will also allow tests to run

@danielnelson danielnelson mentioned this pull request Aug 27, 2018
3 tasks
@danielnelson
Copy link
Contributor

@bsmaldon I opened a pr against your fork ada-foss#1 which I believe addresses the remaining issues.

@ada-foss
Copy link
Contributor Author

I don't totally understand the rationale of all the changes but understand the points about different feel of processors, I didn't really have my eye on the other processors as I was just thinking about my own requirements I guess. In any case I've checked it and it looks functionally the same so if you're happy with it like this then I'm happy too.

@danielnelson
Copy link
Contributor

@bsmaldon Can you run make fmt to sort the all.go file that is causing the test failure?

@danielnelson danielnelson changed the base branch from master to strings September 5, 2018 22:12
@danielnelson danielnelson merged commit d6467e9 into influxdata:strings Sep 5, 2018
@danielnelson danielnelson added this to the 1.8.0 milestone Sep 5, 2018
rgitzel pushed a commit to rgitzel/telegraf that referenced this pull request Oct 17, 2018
otherpirate pushed a commit to otherpirate/telegraf that referenced this pull request Mar 15, 2019
otherpirate pushed a commit to otherpirate/telegraf that referenced this pull request Mar 15, 2019
dupondje pushed a commit to dupondje/telegraf that referenced this pull request Apr 22, 2019
athoune pushed a commit to bearstech/telegraf that referenced this pull request Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants