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!

What the End of Support for Splunk Add-on Builder Means for You

Hello Splunk Community! We want to share an important update regarding the future of the Splunk Add-on Builder ...

Solve, Learn, Repeat: New Puzzle Channel Now Live

Welcome to the Splunk Puzzle PlaygroundIf you are anything like me, you love to solve problems, and what ...

Building Reliable Asset and Identity Frameworks in Splunk ES

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