How to convert "on"/"off" text into boolean with Logstash?

I have a field, that contains either "" (empty string) or "on".

I want to convert that field into an boolean, which treats "" (empty string) as false and "on" as true.

As mentioned with the documentation, the mutate convert filter treats:

  • "true", "t", "yes", "y", and "1" as true
  • "false", "f", "no", "n", and "0" as false
  • empty strings as false

Is there any way to configure mutate convert, that it also convert "on" into true? Maybe just for that particular mutate filter?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.