Splunk Search

Subsearch using boolean logic

bluemarvel
Path Finder

Hello, I am looking for a search query that can also be used as a dashboard.
The query has to search two different sourcetypes , look for data (eventtype,file...etc.) and if the information is missing in one sourcetype and found in another, then it will provided that data for that sourcetype.

Tags (1)
1 Solution

skoelpin
SplunkTrust
SplunkTrust

You can use a case statement to do this

... | eval Your_field=case(sourcetype == sourcetype1, "true", sourcetype == sourcetype2, "true" , 1=1, "false")

http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/CommonEvalFunctions

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

Could you be more specific in your requirement, supported with sample queries/events and expected output?

0 Karma

skoelpin
SplunkTrust
SplunkTrust

You can use a case statement to do this

... | eval Your_field=case(sourcetype == sourcetype1, "true", sourcetype == sourcetype2, "true" , 1=1, "false")

http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/CommonEvalFunctions

Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...