Getting Data In

Send events to null queue which dont have time

power12
Communicator

I have the following sample events coming from 
source="/project/admin/git/ys/es/perf/de/pure/abc0*/logs/*/results.csv"

Event1: with no timestamp  and these type of data is in files  which are 2 days older

abc|pxyz|0.1054|ops|0|null|null

 

Event 2 with timestamp --these are new files from same location and going forward the data would be the same as below 

2024-02-23T00:48:17|AID|read|454482.351348|PS|0|null|null

 

I want to send data to splunk that has a timestamp and send the other to null queue or not to ingest it .

Firstly I tried MAX_DAYS_AGO=2 which did not work then I tried the following props and transforms but it did not work .

transforms
[filter]
REGEX = ^^\D*
DEST_KEY = queue
FORMAT = nullQueue

props.conf


CHARSET=AUTO
SHOULD_LINEMERGE=false
category=Custom
disabled=false
pulldown_type=true
TRANSFORMS-null=filter





Thanks in Advance


Labels (3)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The regex is filtering lines beginning with "^", which aren't in your sample data.  Assuming that's a mistake, it's also filtering on any number of non-digits (including zero), which pretty much matches anything.  Try these settings

transforms
[filter]
REGEX = ^\D+
DEST_KEY = queue
FORMAT = nullQueue

props.conf

TIME_PREFIX = ^
TIME_FORMAT = %Y-%m-%dT%H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 20
CHARSET=AUTO
SHOULD_LINEMERGE=false
LINE_BREAKER = ([\r\n]+)
category=Custom
disabled=false
pulldown_type=true
TRANSFORMS-null=filter
---
If this reply helps you, Karma would be appreciated.

View solution in original post

PickleRick
SplunkTrust
SplunkTrust

You could also go the other way around. Do the nullQueue by default and only send to indexQueue those that _do_ match the timestamp regex.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The regex is filtering lines beginning with "^", which aren't in your sample data.  Assuming that's a mistake, it's also filtering on any number of non-digits (including zero), which pretty much matches anything.  Try these settings

transforms
[filter]
REGEX = ^\D+
DEST_KEY = queue
FORMAT = nullQueue

props.conf

TIME_PREFIX = ^
TIME_FORMAT = %Y-%m-%dT%H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 20
CHARSET=AUTO
SHOULD_LINEMERGE=false
LINE_BREAKER = ([\r\n]+)
category=Custom
disabled=false
pulldown_type=true
TRANSFORMS-null=filter
---
If this reply helps you, Karma would be appreciated.
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!

Accelerate Splunk App Development with AI

  Learn how to automate the repetitive parts of your build cycle.   Watch On-Demand   Replay the Accelerate ...

Splunk Agent Observability: Measuring AI Value with Splunk Tokenomics on AWS

The AI landscape is moving faster than ever, and our latest 2026 State of Observability report provides the ...

Enterprise Security Watch Party: What’s New in 8.8 - Recap

Splunk Community HQ hosted a Splunk Enterprise Security Watch Party: What’s New In ES 8.8 last Thursday. I had ...