Splunk Search

Any alternates for Splunk outer join in my search?

splunkrocks2014
Communicator

I set up a savedsearch to monitor the status from some critical reports (from a "critical_reports.csv" lookup) within a certain time range such as 7 days. I used outer join to find out if the reports did not run because they are disabled from the scheduler for instance. Here is the search query:

index=_internal sourcetype=scheduler "report 1" OR "report 2" 
| stats count by savedsearch_name status result_count alert_actions
| join type=outer savedsearch_name [| inputlookup critical_reports.csv]

However, the Splunk outer join doesn't work as expected by returning no results if there are no results returned from the primary search. I tried to use append with first or values commands as suggested from this link, but it only returns one record per report. Are there any alternate solutions in my case? Thanks.

0 Karma

sbbadri
Motivator

try this,

index=_internal sourcetype=scheduler "report 1" OR "report 2" | stats count by savedsearch_name status result_count alert_actions
| append [| inputlookup critical_reports.csv]

Please go through link for further details,
http://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/Append
https://docs.splunk.com/Documentation/SplunkCloud/6.6.1/SearchReference/Appendcols

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

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...