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

Generic Event String Selector #2087

Merged
merged 2 commits into from
Jul 28, 2016
Merged

Conversation

urso
Copy link

@urso urso commented Jul 24, 2016

preparing for #2064, implement documented logic for customizable keys.

Differs from #2064 that a single-keyword and a multi-keyword can be configured. If both given, the single-keywork is used as default (last selector in list) if all others do fail.

e.g.

output.elasticsearch.pipelines:
- pipeline: "%{[key1]}"
- pipeline: "default"

will be equivalen to:

output.elasticsearch.pipelines:
- pipeline: "%{[key1]}"

output.elasticsearch.pipeline: "default"

On the other hand:

output.elasticsearch.pipeline: "pipeline"

is syntactic sugar for

output.elasticsearch.pipelines:
- pipeline: "pipeline"

Being generic, functionality is re-usable for es-index, logstash-index, redis-key, kafka-topic and others.

@urso urso added in progress Pull request is currently in progress. blocked labels Jul 24, 2016
@urso
Copy link
Author

urso commented Jul 24, 2016

blocked by #2083, #2085 and #2086,

@urso urso force-pushed the enh/event-string-selector branch from 737b1c5 to 2c6986e Compare July 25, 2016 14:20
@urso urso added the review label Jul 26, 2016
@urso
Copy link
Author

urso commented Jul 26, 2016

blocked by required bug-fixes in go-ucfg: elastic/go-ucfg#46 , elastic/go-ucfg#47, elastic/go-ucfg#48

@urso urso removed the in progress Pull request is currently in progress. label Jul 26, 2016
@urso urso force-pushed the enh/event-string-selector branch from a4fee00 to d37ab01 Compare July 26, 2016 15:23
@urso urso removed the blocked label Jul 26, 2016
@urso
Copy link
Author

urso commented Jul 26, 2016

All blockers have been merged. Ready for review.

@urso urso added the libbeat label Jul 26, 2016
@monicasarbu
Copy link
Contributor

LGTM

func buildSingle(cfg *common.Config, key string) (selector, error) {
// TODO: check for unknown fields

// 3. extract required key-word handler
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the numbering here? Is this supposed to be 1.?

@tsg tsg merged commit 284945a into elastic:master Jul 28, 2016
@tsg
Copy link
Contributor

tsg commented Jul 28, 2016

Merged like this, in case the comment above is wrong, it can be easily fixed in a future PR.

@urso urso deleted the enh/event-string-selector branch February 19, 2019 18:36
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