I’ve been given the below advice from our Copilot instance. Can you please confirm its authenticity? I have a few Logstash pipelines using multiple remove_field directives and need to know if I should instead be using multiple mutate blocks. Thankyou.
” Repeating the Same Directive
There is no documentation that explicitly states you cannot repeat remove_field
multiple times. However, based on how Logstash parses configuration blocks, only the last remove_field
directive will be applied, because each directive overwrites the previous one.
This behavior is consistent with how Logstash handles configuration keys: if you repeat the same key (remove_field
) in the same block, the last one wins.”