beats icon indicating copy to clipboard operation
beats copied to clipboard

Filebeat Processors - make uppercase and lowercase processors (as in ES ingest nodes) available to filebeat

Open ccmsi opened this issue 3 years ago • 25 comments

Greetings and thanks for this software.

I would like to request for adding the two processors uppercase and lowercase to filebeat input processing.

Besides being useful, adds to making things consistent.

Thanks for your time and attention

ccmsi avatar Oct 29 '20 10:10 ccmsi

Pinging @elastic/integrations-services (Team:Services)

elasticmachine avatar Oct 29 '20 20:10 elasticmachine

We are encouraging the use of ingest-node processors. What's the driving use case to have them available in the beats themselves?

andresrc avatar Nov 03 '20 15:11 andresrc

The question seems like asking about personal taste. And as there are 2 options that's in a way how it is.

However, its filebeat that offers that option to begin with. There are processors. So one question in return is, why then does it exist if that is your question? IMO filebeat team by implementing processors has already expressed that interest for it to be there and as such this question seems awkward.

For support, i appreciate the decision of the filebeat team to provide processors. I think central management is nice, but distributing load is advantageous performance wise and offers flexibility. Changes are easier to work on while reducing risk.

My request though is about why not having those two simple ones, where the more complex ones, even script, are available.

ccmsi avatar Nov 04 '20 12:11 ccmsi

I would double that.

Now we have hideous rename block with a lot of boilerplate because of casing:

          - from: header.x-request-id
            to: x-request-id
          - from: headers.x-request-id
            to: x-request-id
          - from: headers.X-Request-ID
            to: x-request-id
          - from: headers.X-Request-Id
            to: x-request-id
          - from: headers.X-request-Id
            to: x-request-id

trnl avatar Nov 05 '20 23:11 trnl

Hi, lower and upper case processors would be nice. You can achieve something similar just using the script processor. For example I have a field for log level and I can set it to lowercase like so;

        -
          script:
            lang: javascript
            id: lowercase
            source: >
              function process(event) {
                  var level = event.Get("level");
                  if(level != null) {
                      event.Put("level", level.toString().toLowerCase());
                  }
              }

bduffy-aylien avatar Apr 13 '21 13:04 bduffy-aylien

If no one is working on this one I'd like to give it a go as my first issue in this repo

lplazas avatar Jul 02 '21 15:07 lplazas

Hey, how is this progressing?? Is there any sense of a release date for adding the uppercase and lowercase processors in a filebeat release?

mr1716 avatar Jan 21 '22 14:01 mr1716

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

elasticmachine avatar Mar 31 '22 08:03 elasticmachine

I would also like to know the state of this issue.

We need case-insensitive filtering on Winlogbeat (without using regex). And this processor would allow us to build it.

sqall01 avatar Apr 12 '22 06:04 sqall01

@sqall01 there is the potential to use the script processor and the Javascript toLowerCase and toUpperCase to do this, but this requires looping through the desired values, deleting the old values, and then replacing with the new values. So having this done by a processor would be really helpful! Maybe this is something that elastic can build in for us?

mr1716 avatar May 04 '22 12:05 mr1716

@mr1716 yes the script processor would be a possibility. However, we have to do this for a lot of events that we filtering and I have concerns regarding the performance if we always go through Javascript for this.

sqall01 avatar May 04 '22 17:05 sqall01

@sqall01 agreed. Just throwing it out there as an option, even though it isnt equivalent

mr1716 avatar May 04 '22 20:05 mr1716

@lplazas How is development going?? May you please provide an update?

mr1716 avatar May 05 '22 12:05 mr1716

@jlind23 Any possibility to get some engineers to assist with this development?

mr1716 avatar May 11 '22 12:05 mr1716

@mr1716 this is something that should go through our prioritisation first, for now we do not have someone to work on it.

jlind23 avatar May 11 '22 14:05 jlind23

@jlind23 how would that take place and are there actions that the community would need to do?

mr1716 avatar May 11 '22 14:05 mr1716

@mr1716 The only thing I can think of right now is that this is something you can work on if you need and i'll find someone to review and assist.

jlind23 avatar May 18 '22 09:05 jlind23

@jlind23 Ok. I'll see if there is time, but there looks to be the need. I have a way to do it in Javascript, so maybe the employee can take what I have and convert it to something that can be converted into Filebeat?

mr1716 avatar May 18 '22 15:05 mr1716

@mr1716 it will still imply too much time availability on their end. I will discuss with @nimarezainia on it first.

jlind23 avatar May 19 '22 14:05 jlind23

@jlind23 hey, hope all is well. IS there any progress or update to provide?

mr1716 avatar Sep 22 '22 16:09 mr1716

@mr1716 nothing occurred as we were focused on other areas. Let me add it to @nimarezainia and @pierrehilbert's plate for awareness and prioritization.

jlind23 avatar Sep 23 '22 07:09 jlind23

Is there a plan yet to implement this feature in the near future?

hartfordfive avatar Sep 26 '22 09:09 hartfordfive

I think there are some discussions but nothing concrete https://github.com/elastic/elastic-agent-shipper/issues/160

zez3 avatar Oct 04 '22 14:10 zez3

and this https://github.com/elastic/elastic-package/issues/949#issuecomment-1262753167 "we will try and pursiue the correct implementation in 8.7 (once prioritized amongst other asks there)"

zez3 avatar Oct 04 '22 15:10 zez3

@zez3 thanks for this. So this means that there will be the implementation at some point, which is great!

mr1716 avatar Oct 04 '22 15:10 mr1716