Splunk Search

deduping ans eliminating the duplicate vales from 2 different sourcer

svemurilv
Path Finder

Hi,
we are using a session ID to comparing the Client side server side data with diffrent names (session_c session_S). both the data will be in different indexes. where am trying to eliminate the data where sessionID was populating in both in server and client , i just want to filter out the sessionID was populated either only in client side or server side date.

earliest=1h@h  ( index=client  sourcetype=clientside ) OR (index=server sourcetype=serverside) |dedup session_c, session_S |where session_c!=session_S  |stats values(session_c),values(session_S)
Tags (2)
0 Karma
1 Solution

somesoni2
Revered Legend

I would try something like this (last eval will filterout all sessionID which were appearing in both indexes)

( index=client  sourcetype=clientside ) OR (index=server sourcetype=serverside) earliest=1h@h 
| eval sessionID=coalesce(session_c, session_S) 
| stats values(session_c) as session_c values(session_S) as session_s dc(index) as indexes by sessionID
| where indexes=1

View solution in original post

somesoni2
Revered Legend

I would try something like this (last eval will filterout all sessionID which were appearing in both indexes)

( index=client  sourcetype=clientside ) OR (index=server sourcetype=serverside) earliest=1h@h 
| eval sessionID=coalesce(session_c, session_S) 
| stats values(session_c) as session_c values(session_S) as session_s dc(index) as indexes by sessionID
| where indexes=1

svemurilv
Path Finder

awesome thank you Somesoni2.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...