Splunk Search

How to exlude the event from Indexing?

kiran331
Builder

Hi

I have a cisco ASA event , which I have to exclude before Indexing. What's the best way to do it?

sample event:
Jun 26 15:17:23 11.12.13.144 %ASA-6-305012: Teardown dynamic TCP translation from inside:1.2.3.455/33314 to outside:22.33.44.553/33314 duration 0:00:00

I can Exclude the event containing :

ASA-6-305012 1.2.3.455 22.33.44.553 together.

0 Karma
1 Solution

lguinn2
Legend

Yes, you can use a transform to filter the event. Be sure to test before putting the transform in production, otherwise it may filter too many (or too few) of the events! Assuming that the sourcetype is cisco:ASA, then

props.conf

[cisco:ASA]
transforms-cfilter=filter_cisco_asa

transforms.conf

[filter_cisco_asa]
SOURCE_KEY=_raw
REGEX=ASA-6-305012.*?1.2.3.455.*?22.33.44.553
DEST_KEY=queue
FORMAT=nullQueue

The regular expression looks for events that have ASA-6-305012 followed by 1.2.3.455 and then by 22.33.44.553. Any number of characters can come before, after or between these 3 strings, but all of them must be present to match. Any event that matches is discarded (sent to the null queue).

View solution in original post

lguinn2
Legend

Yes, you can use a transform to filter the event. Be sure to test before putting the transform in production, otherwise it may filter too many (or too few) of the events! Assuming that the sourcetype is cisco:ASA, then

props.conf

[cisco:ASA]
transforms-cfilter=filter_cisco_asa

transforms.conf

[filter_cisco_asa]
SOURCE_KEY=_raw
REGEX=ASA-6-305012.*?1.2.3.455.*?22.33.44.553
DEST_KEY=queue
FORMAT=nullQueue

The regular expression looks for events that have ASA-6-305012 followed by 1.2.3.455 and then by 22.33.44.553. Any number of characters can come before, after or between these 3 strings, but all of them must be present to match. Any event that matches is discarded (sent to the null queue).

Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

Splunk Decoded: Business Transactions vs Business IQ

It’s the morning of Black Friday, and your e-commerce site is handling 10x normal traffic. Orders are flowing, ...

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...