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!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...