Splunk Search

Time modifiers in a subsearch

tmontney
Builder

I have a subsearch that I only want to look for the last 15 minutes. All I find are examples of days. Can someone give me examples of minutes, as well as days, months, and so on (for future reference)? Please be sure to put some of it inline, in case the link goes dead (if you reference a URL).

0 Karma
1 Solution

twinspop
Influencer
some search [search some other search earliest=-15m]

m = minutes
h = hours
d = days
w = weeks
mon = months

View solution in original post

gcusello
SplunkTrust
SplunkTrust

maybe something like this:
index=index1 ... [ search index=index2 earliest=-15m latest=now | dedup field_to_search | fields field_to_search ] ....
bye.
Giuseppe

0 Karma

tmontney
Builder

Thanks but you should really try to add some of the URL content in the body. Often, I find (other sites even more so) the link goes dead. Therefore, the answer is useless. I've found quite a few links so far on Answers that either gave me the equivalent to a 404 or just the main support page.

0 Karma

woodcock
Esteemed Legend

Fair enough but you did not give enough of your own context for us to give any kind of a specific answer. I verified the links before posting them.

0 Karma

tmontney
Builder

twinspop did just fine.

Yes, but links go dead eventually. They're live now, but not a guarantee a year from now. Just take for example links from Microsoft. I can't tell you the number of those that went dead or redirected.

0 Karma

jplumsdaine22
Influencer

To be fair Splunk Docs links are very good - they only go 'dead' if a feature is deprecated from the 'latest' documentation branch.

It would be great if they would redirect deprecated features though!

0 Karma

tmontney
Builder

Yes, they should never "delete" or remove docs. There should always be a reason given, and an alternative given (such as when a method is deprecated).

0 Karma

twinspop
Influencer
some search [search some other search earliest=-15m]

m = minutes
h = hours
d = days
w = weeks
mon = months

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...