Splunk Search

Dedup vs. Lookup performance

responsys_cm
Builder

I have some very high volume firewall records. I want to check the destination IP address against a lookup table that contains known malware C&C IPs.

Is it more efficient to dedup the records and then do the lookup or is it faster to do a lookup on each one?

Thx.

Craig

Tags (3)
1 Solution

dwaddle
SplunkTrust
SplunkTrust

Part of it will be depend on the size of the lookup table. Neither choice has a nonzero cost. Dedup'ing can be expensive for a large number of events, but comparing against a large lookup table might also be expensive.

I would recommend that you model out both scenarios and use the search job inspector to compare and contrast the amount of time spent in each.

Also, you may want to consider summary indexing as a 3rd alternative. A summary that gets updated every few minutes on something as simple as | sistats count by destip could give you a workably fast solution.

View solution in original post

ziegfried
Influencer

Additionally, if the lookup table is small enough, you could use inputlookup in a subsearch to query only addresses from the lookup list:

sourcetype=myfirewall [ | inputlookup cc_ipslist | return 10000 ip ]

will expand to smth like

sourcetype=myfirewall ( ip=1.1.1.1 OR ip=2.2.2.2 OR ip=3.3.3.3 ....)

dwaddle
SplunkTrust
SplunkTrust

Part of it will be depend on the size of the lookup table. Neither choice has a nonzero cost. Dedup'ing can be expensive for a large number of events, but comparing against a large lookup table might also be expensive.

I would recommend that you model out both scenarios and use the search job inspector to compare and contrast the amount of time spent in each.

Also, you may want to consider summary indexing as a 3rd alternative. A summary that gets updated every few minutes on something as simple as | sistats count by destip could give you a workably fast solution.

Get Updates on the Splunk Community!

Using Machine Learning for Hunting Security Threats

WATCH NOW Seeing the exponential hike in global cyber threat spectrum, organizations are now striving more for ...

Observability Newsletter Highlights | March 2023

 March 2023 | Check out the latest and greatestSplunk APM's New Tag Filter ExperienceSplunk APM has updated ...

Security Newsletter Updates | March 2023

 March 2023 | Check out the latest and greatestUnify Your Security Operations with Splunk Mission Control The ...