Splunk Search

stats by _time and field values in that time frame

knarayana
New Member

Expected stats result

Time every 5mins | Apps |count
1:00 |app1,app2,app3 |3
1:05 |app1,app4 |2
1:10 |app4 |1

Tags (1)
0 Karma
1 Solution

micahkemp
Champion

Perhaps:

<base search> | bin span=5min _time | stats values(app) AS Apps dc(app) AS count BY _time

That's assuming you want the distinct set and count of apps during that time.

View solution in original post

0 Karma

micahkemp
Champion

Perhaps:

<base search> | bin span=5min _time | stats values(app) AS Apps dc(app) AS count BY _time

That's assuming you want the distinct set and count of apps during that time.

0 Karma
Get Updates on the Splunk Community!

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureThursday, March 27, 2025  |  11AM PST / 2PM EST | Register NowStep boldly ...

Splunk AppDynamics with Cisco Secure Application

Web applications unfortunately present a target rich environment for security vulnerabilities and attacks. ...