I have apache logs coming into Graylog. In these logs is a log entry message coming in every 5 seconds and it has the word OPTIONS in it. I want to drop these message and not index them. I created a pipeline and a rule, but doesn’t appear to be working.
I can do a simple search: message:OPTIONS and I see the messages. So I created a rule and assigned to the stream:
rule “Drop Apache Noise”
when
contains(to_string($message.message), “OPTIONS”, false)
then
drop_message();
end
Doesn’t work, still got messages coming in and getting indexed.
Am I close?
What stream is your pipeline connected to?
Since pipeline happens before filter, try connecting it to “all messages”. You may want to add a few more conditions in the “when” section not to alter other logs by mistake.