Splunk Search

how to add a threat_score in splunk search

sanikuriakose12
New Member

Hi

I have to creat a total_threat_score field which will be the total of all other score fields

like

if action==allowed it should add a new field called score and add 1 to it...then if bytes_in>100000 then add +1 to that score field..

index=* sourcetype=netscreen:firewall | eval score1=1 | where byte_in>10000| eval score2=score1+1 | where bytes_out>1000 | eval score3=score2+1 | where action="allowed"

this query is not putting results for action=allowed is this the right way to do? please help

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

The where command is a filter. It removes events that don't meet the condition. That means any event where bytes_in <= 10000 will not be seen by the bytes_out test. Try this query.

index=* sourcetype=netscreen:firewall action="allowed" | eval score=1 | eval score=if(bytes_in>10000, score+1,score) | eval score=if(bytes_out>1000, score+1,score) | ...
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...