Splunk Search

splunk search combine different sources

selvam_sekar
Path Finder

Hi,

I have the below scenario. please could you help?

 

spl1:

index=abc  sourcetype=1.1 source=1.2  "downstream"  "executioneid=*"

 spl2:

index=abc  sourcetype=2.1 source=2.2 "do not write to downstream" "executioneid=*"

both the spl uses the same index and they have the common field called executionid.  some execution ids are designed not to go to downstream application in the flow. I want to combine these two spl based on the executioneid

 

Labels (1)
Tags (1)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @selvam_sekar,

you can correlate the two searches using the stats command, something like this:

index=abc ((sourcetype=1.1 source=1.2  "downstream") OR (sourcetype=2.1 source=2.2 "do not write to downstream")) "executioneid=*"
| stats 
   values(sourcetype) AS sourcetype
   values(source) AS source
   BY executioneid

you can also add conditions e.g. the presence in both the sourcetypes or only in one of them.

Ciao.

Giuseppe

isoutamo
SplunkTrust
SplunkTrust

Hi

there are excellent presentations kept on .conf about joining data sets without join.

e.g. https://conf.splunk.com/watch/conf-online.html?search=PLA1528B#/

r. Ismo

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...