Getting Data In

How to remove all duplicates?

joango
New Member

Hi, i got this query

| tstats summariesonly=t allow_old_summaries=t dc(All_Traffic.dest_port) as num_dest_port dc(All_Traffic.dest_ip) as num_dest_ip from datamodel=Network_Traffic by All_Traffic.src_ip, All_Traffic.action
| rename "All_Traffic.*" as "*"
| where num_dest_port > 100 OR num_dest_ip > 100 AND num_dest_port > num_dest_ip
| eval desv=num_dest_port / num_dest_ip
| where desv > 1 AND action!="blocked"

 

And the result is:

joango_1-1672404224411.png

My solution is half way done because it deletes most of them but not the ones that the src_ip is duplicate and the desv is diferent from one another (I don't know why). What I need is that all duplicates with the same ip are deleted.

This is what I have -->  dedup src_ip | where desv > 1 AND action!="blocked" AND action!="teardown"

Thanks!

0 Karma

bowesmana
SplunkTrust
SplunkTrust

The result table you say is after the first search. What exactly is not working after you put in the dedup src_ip and the additional where constraint?

 

0 Karma
Get Updates on the Splunk Community!

Splunk Observability Cloud’s AI Assistant in Action Series: Analyzing and ...

This is the second post in our Splunk Observability Cloud’s AI Assistant in Action series, in which we look at ...

Elevate Your Organization with Splunk’s Next Platform Evolution

 Thursday, July 10, 2025  |  11AM PDT / 2PM EDT Whether you're managing complex deployments or looking to ...

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...