Reporting

How to find difference between 2 search?

yatanveersingh
Engager

Hi All,

 

I am trying to search difference between 2 search:

 

search 1: 

 

index="xxx_prd" "/XX900/LT_TEST"

 

this is returning like 20 records.

 

search 2:

index="xxx_prd" "http://xxx.yyy.com/XX900/LT_TEST"

this is returning 15 records.

 

I want to get the 5 results which are different between search 1 and search 2.

 

pl advice.

 

Thanks

Yatan

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Check out the set diff command.

| set diff [ search index="xxx_prd" "/XX900/LT_TEST"]
  [ search index="xxx_prd" "http://xxx.yyy.com/XX900/LT_TEST" ]
---
If this reply helps you, Karma would be appreciated.

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
index="xxx_prd" "/XX900/LT_TEST" NOT "http://xxx.yyy.com/XX900/LT_TEST"

richgalloway
SplunkTrust
SplunkTrust

Check out the set diff command.

| set diff [ search index="xxx_prd" "/XX900/LT_TEST"]
  [ search index="xxx_prd" "http://xxx.yyy.com/XX900/LT_TEST" ]
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...