Splunk Enterprise

display cummulative sum in timechart

kirrusk
Communicator

I'm trying to display the cumulative sum in the timechart.

two sourcetypes 

index= _internal  | [search sourcetype=source1 clu=*  value=* | rename value as source1value]
| appendcols [search sourcetype=source2 clu=*  value=* | rename value as source2value] 
| table  source1value source2value
| eval res=source2value-source1value 
| stats sum(res)



up to here giving the sum of res, I need to display this cumulative sum in the time chart.

Can anyone suggest how I can achieve this?

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| streamstats sum(res)
0 Karma

kirrusk
Communicator

@ITWhisperer is giving time chart series in exponential form, But I need cumulative data on the time chart.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Please explain what you understand by cumulative as I assumed it was a cumulative or running total which is what streamstats is doing for you?

0 Karma

kirrusk
Communicator

@ITWhisperer I have data like sum(res)
in the table, It will give only a single result.

sum(res)
256


Want to display this value in time series, each point of time has to show sum(res) only.
Is that possible?

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Yes, replace stats sum(res) with streamstats sum(res)

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Thanks for the Memories: .conf26 Took Learning to New Heights

Thank you, Splunk Community, for making .conf26 in Denver one for the books. From packed Splunk University ...

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...