Splunk Search

Dedup within a time range

eolg
New Member

I need to chart the sum of the values of a field by the value of another field over time (e.g. the sum of values of field A for all events that share the same value for field B). However, there is also a third field (field C), and if two events have same value for field C, I don't want them both included in the sum.

Generally, events with the same value for field C will be logged in Splunk at 2 minute intervals, but creating a timechart with a span of 2 minutes doesn't work perfectly because the time can be slightly more or less than 2 minutes. Is there a way to dedup events with the same field C within a certain time range? Or any other way to achieve this?

0 Karma
1 Solution

HiroshiSatoh
Champion
(your search)|bin span=2m _time|dedup _time,field_C

Can you do it?
I think that the condition is missing. Please present sample log.

View solution in original post

HiroshiSatoh
Champion
(your search)|bin span=2m _time|dedup _time,field_C

Can you do it?
I think that the condition is missing. Please present sample log.

tegamax
Engager

what does field_C supposed to do??

0 Karma

eolg
New Member

This worked perfectly! Thank you!

0 Karma

adonio
Ultra Champion

@eolg,
if it solved your questin, kindly accept the answer so other will know this solution worked for you

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