Splunk Enterprise

How to get the count by days?

mahesh27
Communicator

Query:
index=apl-app-grap  sourcetype=grap:apps source=*applications*  host=xxxxxx
|rex field =_raw "\|rank\:(?<Report>.*?)\|"
|eval Pass=if(Report="0", "Pass", null())
|stats count(Pass) as Passed_Count
 output:

Passed_Count
700



But i need the output for day wise, suppose if i select  7 days i should get 7 rows (showing each day count) like shown below:

Passed_Count
100
100
100
100
100
100
100

 

 

Labels (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
index=apl-app-grap  sourcetype=grap:apps source=*applications*  host=xxxxxx
|rex field =_raw "\|rank\:(?<Report>.*?)\|"
|eval Pass=if(Report="0", "Pass", null())
|bin span=1d _time
|stats count(Pass) as Passed_Count by _time
0 Karma
Get Updates on the Splunk Community!

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...