Splunk Enterprise

How to get sum of a value within a period of 15 min?

chandankr
Path Finder

I have an input of value is like an odometer so it's cumulative. I collect a sample every 15 minutes. If I want to create a timechart that shows the total value of 15 min duration. how would I do that? See example below.

1/17/2023 0:01:00 value 6
1/17/2023 0:02:00 value 6
1/17/2023 0:03:00 value 6
1/17/2023 0:09:00 value 7
1/17/2023 0:10:00 value 6
1/17/2023 0:11:00 value 7
1/17/2023 0:12:00 value 8
1/17/2023 0:15:00 value 8


from 1 minute to 15 minute total value is 54

1/17/2023 0:16:00 value 5
1/17/2023 0:17:00 value 8
1/17/2023 0:18:00 value 5
1/17/2023 0:29:00 value 7
1/17/2023 0:30:00 value 5

from 16 minute to 30 minute total value is 30

Labels (1)
Tags (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Try something like this

| timechart span=15m sum(value)

chandankr
Path Finder

@ITWhisperer this is not working 

0 Karma

bowesmana
SplunkTrust
SplunkTrust

Why/how?

What does it give you?

0 Karma

chandankr
Path Finder

 

@ITWhisperer  not getting result

chandankr_0-1674042654230.png

 

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You need to use only one timechart command

| timechart span=15m sum(active_state) as active_state sum(idle_state) as idle_state
0 Karma

chandankr
Path Finder

@ITWhisperer  still no result

chandankr_0-1674109931455.png

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Looks like your extract is not working. Can you share some raw events in a code block?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...