Splunk Enterprise

How to Use Regex and stop the logs reaching Splunk in this Scenario

anandhalagarasa
Path Finder

Hi ,

We want to filter the following data using REGEX in props.conf and tansforms.conf but still the data is coming into Splunk. We have tried few methods but still logs are reaching splunk so kindly help on this request.

Tags (1)
0 Karma
1 Solution

skoelpin
SplunkTrust
SplunkTrust

Put this in your transforms.conf

[GET-to-nullQueue]
 REGEX=\d+\s\-\s-\s\d{3}
 DEST_KEY=queue
 FORMAT=nullQueue

Place this in your props.conf

[YOUR_Sourcetype]
 TRANSFORMS-t1=GET-to-nullQueue

Restart your Splunkd service for the changes to take affect.. This will not work retroactively, this will only work on new events coming in

View solution in original post

DalJeanis
Legend

So which way do you want the decision made? Pick one -

A) Kill anything that starts with GET
B) Keep anything that starts with POST
C) Keep anything that has Java/* in that position.

0 Karma

skoelpin
SplunkTrust
SplunkTrust

Put this in your transforms.conf

[GET-to-nullQueue]
 REGEX=\d+\s\-\s-\s\d{3}
 DEST_KEY=queue
 FORMAT=nullQueue

Place this in your props.conf

[YOUR_Sourcetype]
 TRANSFORMS-t1=GET-to-nullQueue

Restart your Splunkd service for the changes to take affect.. This will not work retroactively, this will only work on new events coming in

horsefez
Motivator

skoelpins regex is right, but you could also use this visually more pleasing one
REGEX=(?=(?>\s\-\s\-\s))

just sayin :3

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Hi Anand, please update us your current props.conf, so that we can understand your current configuration and suggest.

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...