-
Notifications
You must be signed in to change notification settings - Fork 305
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
Add "remove_field" option #218
Comments
The You can eliminate the
This example would remove the The reason This behavior predates the addition of the |
@untergeek I already use trick with To support logstash events without
otherwise documents without As for me, better way will be something like
|
We will not likely add a We might be persuaded to add some functionality to drop the Otherwise, the workaround (thank you for completing it with the conditional) is the expected way to accomplish a field remove. |
Removing fields in a filter is okay if all outputs should receive the same fields, but that isn't necessarily true. This popped up in a recent discuss.elastic.co thread. Having a general output feature for filtering what fields to consider for that particular output seems reasonable IMHO. |
I agree with @magnusbaeck here. That being said, this is not an urgent priority for us at the moment. |
I'm wondering if there's a way to add this to |
To me, allowing removing (or selecting) certain fields at each output is basically a subset of a "send a custom object structure" functionality, which we could probably work on. In my opinion, this kind of behavior belongs in a codec, not an output, because choosing what-and-how to send is a codec's job, in my mind. Further, because some codecs (line, plain, etc) are not structured, maybe this functionality only belongs in some codecs (json, edn, msgpack, etc) that actually send arbitrary-structured data? Let's open a ticket on elastic/logstash to discuss how, if at all, this could be implemented. Just FYI, you could implement your own codec to do this for most outputs (probably except for Elasticsearch output, which doesn't support codecs) |
One alternative for now is to use the clone filter to make a copy of your event, tag it a special way, restructure it as you please, and route that to only one output. |
Hi there! I think that this would be a nice feature for my particular case, and maybe for more people. Right now, I have to deploy two different clusters of Logstash indexers, reading data from the same kafka cluster: 1.- The first one is used to write raw data (containing only If this enhancement was supported, we would be able to use just one cluster because we would be able to remove Thanks, |
@alesnav, as @jordansissel noted in a previous comment you can already use a clone filter to fork the event stream and send variations of the same source event to different outputs, thereby alleviating your need of two sets of Logstash instances. |
closing due to inactivity, also, this functionality would likely be implemented outside of this plugin, so feel free to open a new issue in elastic/logstash if there's continued interest |
Many logstash plugins has this option.
Option can have behaviour "strip document fields before index".
So people can strip field "type", for example, to not have both "_type" and "type" fields in document.
The text was updated successfully, but these errors were encountered: