Splunk Search
Highlighted

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

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
Highlighted

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

SplunkTrust
SplunkTrust

Try this...

 | timechart per_hour(sum(myfield)) as AvgSumPerHour
0 Karma