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 Answers Content Calendar, June Edition

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

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...