Add support for pass/drop/tagpass/tagdrop for outputs

Reuses same logic as the plugins for filtering points, should be only
a marginal performance decrease to check all the points before writing
to the output.

Added examples to the README as well (for generic pass/drop as well as
output pass/drop/tagpass/tagdrop).

X-Github-Closes #398

closes #398
closes #401
This commit is contained in:
Tait Clarridge
2015-12-01 09:15:28 -05:00
committed by Cameron Sparr
parent c83f220fc4
commit 22afc99f1e
6 changed files with 186 additions and 73 deletions

View File

@@ -107,7 +107,7 @@ func (ac *accumulator) AddFields(
}
if ac.pluginConfig != nil {
if !ac.pluginConfig.ShouldPass(measurement) || !ac.pluginConfig.ShouldTagsPass(tags) {
if !ac.pluginConfig.Filter.ShouldPass(measurement) || !ac.pluginConfig.Filter.ShouldTagsPass(tags) {
return
}
}