Getting Data In

Can I "/dev/null" a sourcetype?

Steve_Litras
Path Finder

So I need to temporarily free up some indexing license. Rather than tweaking my deployment, I was hoping I could just route a few sourcetypes to /dev/null for a little while. Is there a way I can tell splunk to not index a sourcetype of a list of sourcetypes?

Thanks Steve

Tags (3)
1 Solution

ftk
Motivator

Yes you can by routing the undesired events to the nullQueue. Check this part of the documentation: http://www.splunk.com/base/Documentation/latest/Admin/Routeandfilterdata#Discard_specific_events_and...

Let's assume you don't want the sourcetype my_sourcetype. On your indexer, set up your props.conf:

[my_sourcetype]
TRANSFORMS-null= setnull

and then in transforms.conf:

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

You can of course tweak the REGEX to not be as greedy and just throw out specific events. But the example as is will discard everything coming in as the my_sourcetype sourcetype.

View solution in original post

ftk
Motivator

Yes you can by routing the undesired events to the nullQueue. Check this part of the documentation: http://www.splunk.com/base/Documentation/latest/Admin/Routeandfilterdata#Discard_specific_events_and...

Let's assume you don't want the sourcetype my_sourcetype. On your indexer, set up your props.conf:

[my_sourcetype]
TRANSFORMS-null= setnull

and then in transforms.conf:

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

You can of course tweak the REGEX to not be as greedy and just throw out specific events. But the example as is will discard everything coming in as the my_sourcetype sourcetype.

Steve_Litras
Path Finder

Worked like a charm! Thanks.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...