Splunk Search

How do I combine 3 searches?

USER78
New Member

I have search1 which is a join of 2 different log sources ( S1 , S2 ). After joining these sources, I used rex to extract one specific field like field1 ( I had to combine two sources as this gave me all the data I needed ) .

index=sthng  sourcetype=source S1  some condition Y  | join common filed  [ search sourcetype=Source S2 LogType= *| fields - to be excluded ] | rex field=field extracted f1   | stats  values(*)  | eval condition resulting in field Z  | search z > 10

I have another search which has results from another source (S3). I again used rex to extract one specific field, like field 2, in this search.

index=same as above search  sourcetype=S3  some condition C  | rex field= field extracted f2.

Now, I want to compare both these searches based on field1 , field2 — like, compare field1 and field2 from the results of both the searches, and if at the same time ( or around the same time ) , field1 is not equal to field 2, it would show me the results.

0 Karma
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!

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

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...