Splunk Search

Filter out "everything but..." from certain source with heavy forwarder?

km_sec
New Member

I want to filter out everything in my massive firewall logs except those events with event codes for a few important event types. Here's what I have right now:

inputs.conf

[monitor:///data/HOSTS/edge_firewall/edge/.../*.log]
sourcetype = cisco:asa
host_segment = 5
index = edge_firewall

props.conf

[source::/data/HOSTS/edge_firewall/edge/.../*.log]
TRANSFORMS-set = Edge_Null,Edge_Filter

transforms.conf

[Edge_Null]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[Edge_Filter]
REGEX = \[.*(305010|305011|305012|302014|302016).*\]
DEST_KEY = queue
FORMAT = indexQueue

I previously used [source::///data/HOSTS/edge_firewall/edge/.../*.log] as a <SPEC> in props.conf because it matched what is used in inputs.conf. When I did this, everything in the source was being indexed, not just the parts in the regex, so I know the inputs.conf stanza works. After changing it to what you see above, however, nothing from that source is sent, which leads me to believe it is all being sent to nullQueue and either my regex in [Edge_Filter] is invalid or nothing is getting past [Edge_Null].

Why isn't this working? What have I done wrong and how can I fix it? Would it be wiser to use an inverse regex (i.e. ^(?!.*(305010|305011|305012|302014|302016))) in [Edge_Null] instead?

0 Karma

abhijitmishra87
Explorer

You have a '.' (dot) matched to Edge_Null. That would match everything and send everything to nullQueue.

0 Karma

km_sec
New Member

So should I remove [Edge_Filter] and put something like ^(?!.*(305010|305011|305012|302014|302016)) in [Edge_Null] to grab what I want out of nullQueue? Will that regex work, and how would I send the result to indexQueue?

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...