Splunk Search

Question about table and duplicate fields

ddarmand
Communicator

Hello everyone,

I have a splunk request that creates a table with two fields X and Y and i want to deduplicate lines when there is this situatin :

           X - Y
entry 1 :  A   B
entry 2 :  B   A

how can i do that ? dedup x,y doesn't work 😞

thanks,

Damien

Tags (3)
0 Karma
1 Solution

lguinn2
Legend

You could do something like this:

yoursearchhere
| eval compareString = min(X,Y) + max(X,Y)
| dedup compareString
| fields - compareString

I am not entirely sure this will work, but I think it will

View solution in original post

lguinn2
Legend

You could do something like this:

yoursearchhere
| eval compareString = min(X,Y) + max(X,Y)
| dedup compareString
| fields - compareString

I am not entirely sure this will work, but I think it will

ddarmand
Communicator

thanks a lot

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Those two lines don't look like duplicates to me, so dedup isn't going to throw one out. One would be thrown out if X=A and Y=B is true for both events.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...