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!

Exciting News: The AppDynamics Community Joins Splunk!

Hello Splunkers,   I’d like to introduce myself—I’m Ryan, the former AppDynamics Community Manager, and I’m ...

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...