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!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...