- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

sillingworth
Path Finder
06-27-2017
08:53 AM
I have this search:
...
| rename value as "Response Time"
| timechart span=1m max("Response Time") by app_name limit=5 useother=false usenull=false
and I'd like to allow 'max("Response Time")' to change to 'avg("Response Time")' depending on user input. Is there a way to do this?
I've tried $token$("Response Time") but that doesn't work.
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

sillingworth
Path Finder
06-28-2017
03:03 AM
Here's how I've done it:
...
| stats max(value) as PerMinMax, avg(value) as PerMinAvg by _time, app_name
| eval "Response Time"=case("Average"=="Max", PerMinMax, "Average"=="Average", PerMinAvg)
| timechart span=1m max("Response Time") by app_name limit=5 useother=false usenull=false
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

sillingworth
Path Finder
06-28-2017
03:03 AM
Here's how I've done it:
...
| stats max(value) as PerMinMax, avg(value) as PerMinAvg by _time, app_name
| eval "Response Time"=case("Average"=="Max", PerMinMax, "Average"=="Average", PerMinAvg)
| timechart span=1m max("Response Time") by app_name limit=5 useother=false usenull=false
