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
Esteemed Legend

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
Esteemed Legend

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!

Mission Control | Explore the latest release of Splunk Mission Control (2.3)

We’re happy to announce the release of Mission Control 2.3 which includes several new and exciting features ...

Cloud Platform | Migrating your Splunk Cloud deployment to Python 3.7

Python 2.7, the last release of Python 2, reached End of Life back on January 1, 2020. As part of our larger ...

Splunk Observability Cloud | Enhancing Your Onboarding Experience with the ...

We understand that your initial experience with getting data into Splunk Observability Cloud is crucial as it ...