I’m looking for a quick pointer (struggling to find an example) of a pipeline rule which will keep any received message which contains the string “NAT Mapping” and drop everything else.
I have used extractors to sort messages (example below) and have the field “msg”
I have added the rule as suggested but when i run the simulator anything I input into the “Raw Message” but result in “not stored”.
As far as I can see “msg” is a valid field and shows in “search” with the value of “NAT Mapping” quite often.
Would someone be able to clarify what this part of the rule means “$message.msg” I’m struggling with the syntax and wonder if the rule is looking in the wrong place?
what is your processing order in System > Configuration ? the way you wanted to have it work the processing pipeline should be below the Message Filter Chain.
Apologies for the late response I was caught up on another project last week. Thanks for your responses Ponet and Jan.
So it would appear that my understanding of the $message.msg object/field was correct (thanks).
Also I have changed my processing order but still receive a “not stored” result from the pipeline simulator (output below). Current order is Geoip > Message chain filter > Pipeline Processor.
ea25ad41-f96d-11e9-9aff-000c29f6e1c5 Not stored
Timestamp
2019-10-28 10:30:08.660
Stored in index
Message is not stored
rule “Drop all but Rule”
when
NOT contains(to_string($message.msg), “NAT Mapping”, false)
then
drop_message();
end
This is the only pipeline/rule I have so don’t nothing else should be impacting the result. As is often the case with issues such as this i’m sure its something silly resulting my a lack of knowledge/experience with the product. Is there anything glaringly obvious wrong with the above rule?
Sorry, yes that does seem to be the case…I had started using the simulator as a basis to test if the rule was working or not. Looking at the data it seems it started working once I changed the processing order. It would seem what I now need to research is where i am going wrong with the simulator…