Splunk Search

How to get added count for the fields from previous count over a period of time?

madhu06
Engager

I am having a issue tracker for tracking all opened issues and the query for the same is below:

search issue_status=open| timechart span=1d count(issue_id) by issue_category | addtotals 

I need to see addtotals as count of total open issues for the current day and with the sum from previous days ie. each day it should show total count of all open issues so far (today's + sum till yesterday's).
Could you please help me?

0 Karma

to4kawa
Ultra Champion
issue_status=open earliest=-1d@d
| eval date=if(_time < relative_time(now(),"@d"),"yeasterday","today")
| stats count(issue_id) as id by date issue_category
| xyseries issue_category date id

and add your calculation.

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 ...