I am building a custom Technology Add-on (TA) where I need to silently drop specific events using nullQueue but also log metadata about those dropped events to a separate log file for auditing purposes.
Here’s my scenario:
props.conf:
[custom:app]# Drop all network heartbeat events
[route_network]
REGEX = .*CEF:0\|MyCompany\|NetworkMonitor\|[^|]+\|[^|]+\|Heartbeat\|
DEST_KEY = queue
FORMAT = nullQueue
# Drop specific Windows events coming in CEF
[route_app_events]
REGEX = .*CEF:0\|Microsoft\|Windows\|[^|]+\|[^|]+\|(AppCrash|UpdateService|Security-Auditing|LicensingService)\|
DEST_KEY = queue
FORMAT = nullQueue
With the above configuration:
Any events matching these rules are discarded silently — which works perfectly.
However, I also need to log each dropped event type to a file like this:
[2025-09-08 14:05:22] Network heartbeat event skippedI need to:
Continue silently dropping these events using nullQueue (no indexing or storage in Splunk index).
Simultaneously write a small log entry to a file (e.g., $SPLUNK_HOME/var/log/splunk/skipped_events.log) whenever an event is skipped, for operational tracking.
There's no way to do it using built-in props/transforms functionality. Yes, you can filter out events. Yes, you could strip them to some minimal version and redirect to another index. No, you cannot write to a text file.
A very very very ugly walkaround could be to reroute such events to syslog and set up a local syslog receiver but this is a Very Very Bad Idea (tm).
@PickleRick
Is there any way we can use python script in anyway to achieve this?
If the data is already ingested into Splunk's "pipeline" - no.
You could use python to create a modular input but that would work on an earlier step - betore the data is injected into input queue.
You'll need to create a modular input to do that. Use regular expressions to test the incoming data, discard matches and log the activity.
@richgalloway Hey, can you please explain me how to do it?