Splunk Search

How to add a column with the max values for a set of fields on each row and add these values in the totals row?

David_Hodgson
Engager

I need to add a maximum column for a set of fields on each row (created using chart ... OVER ... BY ... ), and then add the maximum of this into the totals row. Any suggestions on how to do this?

0 Karma

sundareshr
Legend

Don't believe addtotals has that option, but here is a workaround you could try

eventtype=splunkd-log earliest=@h | chart count over component by eventtype | untable component eventtype count | appendpipe [stats max(count) as max by component ] | sort component | eval c=coalesce(count, max) | fillnull value="Max" eventtype | chart list(c) as c over component by eventtype
0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...