I have the following conditions multiple times in my logstash.conf.
Is they some way to remove the duplication ?
if [body][content][totalConsumers] != "null" {
mutate {
remove_field => ["[body][content][totalConsumers]"]
}
}
if [body][content][newConsumers] != "null" {
mutate {
remove_field => ["[body][content][newConsumers]"]
}
}
if [body][content][daysActiveConsumers] != "null" {
mutate {
remove_field => ["[body][content][daysActiveConsumers]"]
}
}