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!

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

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...