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

Update filtering documentation #2631

Merged
merged 2 commits into from
Apr 6, 2017
Merged

Update filtering documentation #2631

merged 2 commits into from
Apr 6, 2017

Conversation

danielnelson
Copy link
Contributor

I tried to clarify some of the issues surrounding tagpass, reordered taginclude/tagexclude to match the other filters, and tried to correct some of the terminology.

Required for all PRs:

  • CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • Sign CLA (if not already signed)
  • README.md updated (if adding a new plugin)

@danielnelson
Copy link
Contributor Author

cc @phemmer

* **namepass**:
An array of strings that is used to filter metrics generated by the
current input. Each string is tested as a glob match against measurement names
and only if it matches, the field is emitted.
Copy link
Contributor

Choose a reason for hiding this comment

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

only if it matches, the field is emitted

the point is emitted

An array of strings that is used to filter metrics generated by the current
input. Each string in the array is matched as a glob pattern against field
names and if it matches, the field is emitted. `fieldpass` is not available
for outputs.
Copy link
Contributor

@phemmer phemmer Apr 5, 2017

Choose a reason for hiding this comment

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

Should note that only fields which match are emitted. All other fields will be dropped.

`fielddrop` is not available for outputs.
* **tagpass**:
A table mapping tag keys to arrays of tag value patterns. Each pattern is
matched as a glob against the corresponding tag key and if the point contains
Copy link
Contributor

Choose a reason for hiding this comment

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

the corresponding tag key

the tag value

 

And clarification why to omit "corresponding"

Each pattern is matched ...

There is only one tag value. So each pattern corresponds to what?

pass an entire point based on its tag, `taginclude` passes only the specified
tags from the measurement. This filter can be used on both inputs & outputs,
but it is _recommended_ to be used on inputs, as it is more efficient to
filter out tags at the ingestion point.
Copy link
Contributor

Choose a reason for hiding this comment

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

The description doesn't cover how to format the config param. An array of tag names to glob. non-matching tag is dropped.

@danielnelson
Copy link
Contributor Author

I rewrote it all again. Made sure to start with the type of the field and tried to simplify/clarify.

Copy link
Contributor

@phemmer phemmer left a comment

Choose a reason for hiding this comment

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

Hooray for clear documentation! 👍

The inverse of `namepass`. If a match is found the point is discarded. This
is tested on points after they have passed the `namepass` test.
* **fieldpass**:
An array of glob pattern strings. Only fields whose field key matches an
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:

matches an

matches a

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks

@danielnelson danielnelson merged commit c9f8308 into master Apr 6, 2017
@danielnelson danielnelson deleted the update-filter-docs branch April 6, 2017 19:06
vlamug pushed a commit to vlamug/telegraf that referenced this pull request May 30, 2017
maxunt pushed a commit that referenced this pull request Jun 26, 2018
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

3 participants