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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...