Dashboards & Visualizations

How to find the average duration trend of top 5 api above 5 seconds?

limalbert
Path Finder

How can I find the avg duration trend (timechart) of top 5 (most used) api above 5 seconds. If api has the same total calls, pick the highest duration.

This is what I have so far.

 

 

<Search string>
| bin _time span=1m 
| eventstats count as total by api
| stats avg(kpi_value) as duration by _time api total
| where duration >5
| timechart eval(round(avg(duration),2)) as avg_duration by api where total in top5 limit=0

 

 

 

Labels (2)
0 Karma
1 Solution

somesoni2
Revered Legend

Give this a try

<Search string>  
| bin _time span=1m 
| stats avg(kpi_value) as duration by _time api
| where duration >5
| timechart eval(round(avg(duration),2)) as avg_duration by api limit=5 useother=f

View solution in original post

0 Karma

somesoni2
Revered Legend

Give this a try

<Search string>  
| bin _time span=1m 
| stats avg(kpi_value) as duration by _time api
| where duration >5
| timechart eval(round(avg(duration),2)) as avg_duration by api limit=5 useother=f
0 Karma

limalbert
Path Finder

I had this originally, but I might have been overthinking this problem. Thanks!

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...