Splunk Search

How to do sum or count of all my fields one time?

NPR
Path Finder

hi.
i have more 15 fields in my events with different field name.
ex:
field1 field2 field3 ... fieldn

i want do sum,avg or count of all my fields one time, how do it ?
i try this:
|stats sum(field1) sum(field) ...sum(fieldn) by User date_day

it is work but it is very laborious for me.

please help me.

Tags (3)
0 Karma
1 Solution

fdi01
Motivator

try like this:

...|stats c(*) sum(*) avg(*) by User date_day
   or 
...|stats c(*) as count_* sum(*) as sum_* avg(*) as avg_* by User date_day

View solution in original post

fdi01
Motivator

try like this:

...|stats c(*) sum(*) avg(*) by User date_day
   or 
...|stats c(*) as count_* sum(*) as sum_* avg(*) as avg_* by User date_day

NPR
Path Finder

thank you.

0 Karma
Get Updates on the Splunk Community!

AppDynamics Summer Webinars

This summer, our mighty AppDynamics team is cooking up some delicious content on YouTube Live to satiate your ...

SOCin’ it to you at Splunk University

Splunk University is expanding its instructor-led learning portfolio with dedicated Security tracks at .conf25 ...

Credit Card Data Protection & PCI Compliance with Splunk Edge Processor

Organizations handling credit card transactions know that PCI DSS compliance is both critical and complex. The ...