Splunk Search

Show the average per 4 seconds on a timechart with "count by"

hofer
Explorer

I have an timechart (over 1 hour) with "count by STATUS" and i changed the span of the timechart to 4s, since Splunk can chart at max 1000 points in one chart. Now it shows me, how many times p.e. "OK" appears in 4 seconds.
I want the value for just 1 second. Since it's not possible to just set span=1s, I have tried with some per_second value, but I couldn't get it to work fine.

rex max_match=10 "state-text\d\":\"(?P[]\w ]+)" | timechart span=4s count by state_text | timechart span=4s per_second(count)

If there are multiple status, I want multiple lines with the average of count over 4 seconds.

0 Karma

btt
Path Finder

hi, try with bucket command
...|bucket span=1s _time |timechart count by STATUS

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...