Splunk Search

How to specify the time range chosen on a chart's y-axis?

pstickne
Explorer

For a timechart such as " .. | timechart count", there will be an arbitrary bucket size selected depending on certain values, including the time range chosen. (To be as flexible as possible the span= option will NOT be used.)

However, this can lead to a misleading value of "y" depending on the bucket size, e.g.:
Does "y" represent the count per HOUR? Per Minute? Per Day?

How can the "y" axis be corrected to "per HOUR" for ANY bucket size automatically selected by the timechart command? Currently I've used some manual hard-coded math evals in some charts, but this feels unnecessarily complex and tedious, and relies on a fixed SPAN size.

0 Karma

DalJeanis
SplunkTrust
SplunkTrust

Try this...

 | timechart per_hour(sum(myfield)) as AvgSumPerHour
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 ...