Splunk Search

Pass subsearch field to parent search

satya2p
Path Finder

I am trying to pass number from subsearch to main search and find before or after 10 values of number. So if number is 50 parent search should pull events from 59 to 59 or 50 to 41.

index=* Number="*" [search index=* "idnumber" | tail 1 | fields Number | format] | head/tail 10
0 Karma
1 Solution

somesoni2
Revered Legend

Try like this

 index=*  [search index=* "idnumber" | tail 1 | table Number |eval Number=mvrange(Number-10,Number+10) ]

View solution in original post

0 Karma

satya2p
Path Finder

Thank you, it worked.

0 Karma

somesoni2
Revered Legend

Try like this

 index=*  [search index=* "idnumber" | tail 1 | table Number |eval Number=mvrange(Number-10,Number+10) ]
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...