Hi everyone,
Running Graylog 4.3.x. I have been trying to drop specific messages from a stream using a few different qualifiers. Example rules I’ve tried.
rule "ESXi Drop Verbose Messages Based on Facility"
when
regex("\\bverbose\\b",to_string($message.message)).matches==true
then
drop_message();
end
rule "ESXi Drop Verbose Messages Based on Facility"
when
contains(to_string($message.message), “verbose”)
then
drop_message();
end
rule "ESXi Drop Verbose Messages Based on Facility"
when
contains(to_string($message.facility_num), “20”) && contains(to_string($message.level), “7”)
then
drop_message();
end
I’ve verified that the Message Filter Chain executes before Pipeline Processor.
I’ve ran debug on the drop_message function and get a lot of
PIPELINE DEBUG: Passed value is NULL
Message log example from graylog
herp.derp.corpo.lab Hostd: verbose hostd[2103333] [Originator@6876 sub=Libs opID=6f9a4033-01-01-dd-a71b] VigorTransport_ClientSendRequest: opID=6f9a4033-01-01-dd-a71b seq=38258: Sending GuestStats.SetNotificationTime request.
Raw message example
1.2.3.4.40224 > corpo.lab.syslog: SYSLOG, length: 301
Facility local4 (20), Severity debug (7)
Msg: 2023-01-12T19:44:43.485Z herp.derp.corpo.lab Hostd: verbose hostd[2102275] [Originator@6876 sub=AdapterServer opID=2c963ec1 use r=vpxuser] New request: target='vim.InternalStatsCollector:ha-internal-stats-collector', method='queryLatestVmStats', session='5233d284-30c7-c2c 7-8965-d51487011d27'\0x0a
11:44:43.485745 IP (tos 0x0, ttl 62, id 61847, offset 0, flags [none], proto UDP (17), length 255)
Rule is in a pipeline with no other stages and the rule is set to match at least one rule before continuing. Regardless of which rule, it looks as though some messages are processed but it’s very few (should be hundreds if not thousands) and I can confirm that none of the messages are being dropped if I search for them in the stream.
Any help would be appreciated