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

[WIP ] rework configuration and documentation => better default #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wiibaa
Copy link
Collaborator

@wiibaa wiibaa commented Dec 9, 2015

Reworked the plugin to achieve expected behaviour described in #1 => empty config create one clone.
But keep backward compatibility
Improved the documentation

@purbon or @jsvd I would need some guidance on correctly testing the yielded event in the spec if you extra time for review

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

# How this filter should operate
# * 'single' => create an exact copy
# * 'multiple' => create several copies using identifiers from the `clones` config
config :mode, :validate => ["single", "multiple"], :default => "single"
Copy link
Member

Choose a reason for hiding this comment

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

I've been thinking about this, what if instead of having single/multiple setting with :mode, set instead a default for :clones ? For example:

config :clones, :validate => :array, :default => ["clone"]

this way the default behaviour of clone {} is the creation of 1 clone, and the clone will have type => clone

@anitakrueger
Copy link

Any chance of merging this? I've just tried to use the clone filter with the current documentation and couldn't make it work.
I came here because I found #1

@jsvd
Copy link
Member

jsvd commented Jul 15, 2019

hi @anitakrueger, newer versions of the clone filter require clones to be set, and warn if the array is empty https://www.elastic.co/guide/en/logstash/7.2/plugins-filters-clone.html#plugins-filters-clone-clones

@anitakrueger
Copy link

@jsvd I saw this in the documentation, yes. Unfortunately there is no example present for the clones configuration option. However for the common options there are lots of examples and none of them include clones. This is confusing.
In addition to that the documentation says that the value type for clones is array, but it does not list the possible options. How is a user supposed to know to set it to clone?

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.

5 participants