Splunk Search

Can someone help me with a regex that transforms nullQueue before specific date?

anzianojackson6
Explorer

I've got data coming in (Dropbox). This is pulled with the TA via REST API. I can't use the ignoreOlderThan in inputs.conf, because it's pulled via script. It wants to pull all our data since 2016 and work up to present day. Really don't care for old stuff like that.

So, I'm doing the Transforms nullQueue and props.conf method. I'm trying to exclude/ignore anything older than 2018-08 and newer. Anyone know the regex to do this?

LOG:
{"country": "US", "region": "Utah", "user_id": 000000000, "name": "Slab Squattrust", "time": "2016-10-12T16:55:49+00:00",....
{"country": "US", "region": "Utah", "user_id": 000000002, "name": "Cary Petterborg", "time": "2018-08-12T16:55:49+00:00",....
{"country": "US", "region": "Idaho", "user_id": 000000000, "name": "Flint Ironstag", "time": "2018-09-02T16:55:49+00:00",....
{"country": "US", "region": "Maryland", "user_id": 000000000, "name": "Blast Hardcheese", "time": "2018-09-01T16:55:49+00:00",....
{"country": "US", "region": "Space", "user_id": 000000000, "name": "Gristle McThornbody", "time": "2018-07-12T16:55:49+00:00",....

props.conf
[dfb:rest]
TRANSFORMS-null=setnull

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

Also, bonus Karma points if you can guess the movie reference. And a possibly awkward hug at .conf next month from me.

0 Karma

sudosplunk
Motivator

If you're timestamp is this "time": "YYYY-MM always, then try something like below:

transforms.conf

[setnull]
REGEX = time\"\:\s\"(201[0-7]|2018\-0[0-7])
DEST_KEY = queue
FORMAT = nullQueue
0 Karma

kristian_kolb
Ultra Champion
REGEX = time\"\:\s\"(201[0-7]|2018\-0[0-7])

if you want to have the exclude anything before August 2018.

mstjohn_splunk
Splunk Employee
Splunk Employee

haha @anzianojackson6761, I was just searching your usernames to see what those were a reference to. Looks like I need to see Space Muntiny 🙂

0 Karma

anzianojackson6
Explorer

Nice. You win.

Back to the ticket, I'm wondering if I do something like:
REGEX = 201[0-7].*
DEST_KEY = queue
FORMAT = nullQueue

I'd accomplish the same thing.

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...