Getting Data In

Transform to nullQueue depends on search?

Burritobizon
Engager

Hello,

I've been spending the last month experimenting with Splunk. Lately, i've tried to reroute a specific event to the nullQueue, with the intention of preventing it from being indexed:

May 18 12:52:43 lnx-iadevopsnode2 kubelet: E0518 12:52:43.207579    4688 file.go:76] Unable to read manifest path "/etc/kubernetes/manifests": path does not exist, ignoring

Using the following props.conf:

[kubelet]
TRANSFORMS-manifest = setmanifestnull

and transforms.conf:

[setmanifestnull]
REGEX=(Unable to read)
DEST_KEY=queue
FORMAT=nullQueue

The default index is main. When i run a realtime search: index=main, the event still occurs. However, if i change the search to index=main sourcetype=kubeletthe event does not occur.

Why could this be?

0 Karma
1 Solution

FrankVl
Ultra Champion

A sourcetype that was set using a TRANSFORMS statement cannot be used for other index time configurations. Splunk will only apply index-time stanzas matching the original sourcetype, not the new sourcetype from the transforms.

So to achive this, either put the nullqueue transform under the source stanza, or put it under the correct souretype stanza and perhaps make the regex a bit more specific, such that it still only matches kubelet events.

Also: your sourcetype override is not defined correctly. It should be: FORMAT = sourcetype::$1. That is why your search including sourcetype = kubelet doesn't return results I guess.

View solution in original post

FrankVl
Ultra Champion

A sourcetype that was set using a TRANSFORMS statement cannot be used for other index time configurations. Splunk will only apply index-time stanzas matching the original sourcetype, not the new sourcetype from the transforms.

So to achive this, either put the nullqueue transform under the source stanza, or put it under the correct souretype stanza and perhaps make the regex a bit more specific, such that it still only matches kubelet events.

Also: your sourcetype override is not defined correctly. It should be: FORMAT = sourcetype::$1. That is why your search including sourcetype = kubelet doesn't return results I guess.

somesoni2
Revered Legend

The Splunk routing and filtering that you have is only applied to events of sourcetype kubelet. If there are similar events coming from other sourcetypes, those will not be filtered and be shown when you just search with index=main.. Try to run this and see which sourcetypes are showing events which you wanted to filter.

index=main "Unable to read" | stats count by sourcetype

If you want to drop it from all sourcetypes, just set the same (you can still reference your existing transforms.conf stanza) for those sourcetypes.

0 Karma

Burritobizon
Engager

It is showing only one sourcetype: kubelet.

I should mention that the sourcetype kubelet is created by a field extraction.

props.conf:

[source::/var/log/messages]
TRANSFORMS-messagetype = messagetype

transforms.conf:

[messagetype]
DEST_KEY = MetaData:Sourcetype
REGEX = :\d\d .*? (.*?(?=:))
FORMAT = $1
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!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...