Splunk Search

Use field values from main search in subsearch

hawifaris11
Engager

I have a two lookup files events_lookup and risky_events_lookup . I have the following search;

| inputlookup events_lookup.csv 
| join [| inputlookup risky_events_lookup.csv | where risky_start_time<=start_time AND risky_end_time>start_time | stats count as 
high_risk_events]
| eval high_risk_period=if(high_risk_events>0, "Yes", "No")
| table *

I am looking to see if any events are taking place while risky events are, the start_time field is from the events_lookup however I cannot get the search to work. The field start_time does not translate to anything within the subsearch so therefore high_risk_events is always equal to zero. Could use some pointers, thanks

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

Ready to make your IT operations smarter and more efficient? Discover how to automate Splunk alerts with Red ...