Splunk Search

stats sum?

efelder0
Communicator

From my list of field in Splunk, I have three fields with numeric values that I would like to add together and assign the total to a field called "Total_Threat_Count".

i.e. - Critical_Severity = 50 + Medium_Severity = 25 + Low_Severity = 25 AS Total_Threat_Count (100)

What would the stats command that would work best here.

I have tried stats sum(Critical_Severity, Medium_Severity, Low_Severity) AS Total_Threat_Count, but I am getting a blank value for that field.

Tags (1)
0 Karma

cphair
Builder

I think you want to use eval here. Something like

... | eval Total_Threat_Count=Critical_Severity + Medium_Severity + Low_Severity | table host, Total_Threat_Count

should work.

0 Karma
Get Updates on the Splunk Community!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

New Release | Splunk Cloud Platform 10.1.2507

Hello Splunk Community!We are thrilled to announce the General Availability of Splunk Cloud Platform 10.1.2507 ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

🗣 You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...