Splunk Search

Help with a simple search: How do I count how many days match a certain criteria? (example below)

dritjon
Path Finder

I have this search which builds a table

my_search | timechart span=1d sum(eval(b/1024/1024/1024)) AS volume_b

it will build a table like this:

24 October18
25 October10
26 October25
27 October30

 

Now, from this search I want to do a simple count: how many days have a volume>15

for the table above it would just show count: 3

Labels (2)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @dritjon,

you have to add a condition and stats count to your search:

my_search 
| timechart span=1d sum(eval(b/1024/1024/1024)) AS volume_b
| where volume_b>15
| stats count

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @dritjon,

you have to add a condition and stats count to your search:

my_search 
| timechart span=1d sum(eval(b/1024/1024/1024)) AS volume_b
| where volume_b>15
| stats count

Ciao.

Giuseppe

Get Updates on the Splunk Community!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...