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!

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 on November 6 at 11AM PT, and empower your SOC to reach new heights! Duration: ...

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