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!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...