Splunk Search

How to use SEDCMD to skip whole lines matching a regex pattern from being indexed?

dominiquevocat
SplunkTrust
SplunkTrust

We have a system where at times the engineers running it need to enable debug output. This naturally kills the splunk license easily :-).

I currently use something like this on the indexer but it uses lots of resources at times so i would like to do it with a sedcmd on the sending machine.

transforms.conf
[setnull]
REGEX = .+-DBG_.+
DEST_KEY = queue
FORMAT = nullQueue

So the pattern is rather easy 🙂 but how can i use SEDCMD to skip lines matching the pattern from being sent to the indexer?

0 Karma

woodcock
Esteemed Legend

You need to reinstall your forwarder as a heavy forwarder and then do one of the to "delete some and forward the rest" options in the link below. Do note what it says about using SEDCMD (it does not support the delete capabilitybut you can use thereplace` capability to swap with "nothing"):

http://answers.splunk.com/answers/122830/filtering-fields-in-log-before-forward-to-indexing.html

This page may also help:

http://docs.splunk.com/Documentation/Splunk/6.2.3/Data/Anonymizedatausingconfigurationfiles

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...