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!

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 ...