Hi @rjoijode Try the following search - replacing the dashboard_1/2 values as required. The cumulative_run_time_sec will give you the total search time for that dashboard in the selected time period - which means if the dashboard is rendered twice then this will show both times. index=_audit action=search info=completed provenance="UI:Dashboard:*"
| eval dashboard_name=case(
like(provenance, "%dashboard_1%"), "Dashboard 1 (Multiple Searches)",
like(provenance, "%dashboard_2%"), "Dashboard 2 (Base Search)",
1=1, "Other"
)
| where dashboard_name!="Other"
| stats
count as total_search_jobs,
sum(total_run_time) as cumulative_run_time_sec,
avg(total_run_time) as avg_job_run_time_sec,
sum(scan_count) as total_scanned_events,
sum(result_count) as total_returned_results
by dashboard_name
| eval cumulative_run_time_sec=round(cumulative_run_time_sec, 2), avg_job_run_time_sec=round(avg_job_run_time_sec, 2)
| table dashboard_name total_search_jobs cumulative_run_time_sec avg_job_run_time_sec total_scanned_events total_returned_results If you want the *last* invocation you could try: index=_audit action=search info=completed provenance="UI:Dashboard:*"
| eval dashboard_name=case(
like(provenance, "%dashboard_1%"), "Dashboard 1 (Multiple Searches)",
like(provenance, "%dashboard_2%"), "Dashboard 2 (Base Search)",
1=1, "Other"
)
| where dashboard_name!="Other"
| rex mode=sed field=search_id "s/_\d+\.\d+\'?$//"
| dedup search_id
| stats
count as total_search_jobs,
sum(total_run_time) as cumulative_run_time_sec,
avg(total_run_time) as avg_job_run_time_sec,
sum(scan_count) as total_scanned_events,
sum(result_count) as total_returned_results
by dashboard_name
| eval cumulative_run_time_sec=round(cumulative_run_time_sec, 2), avg_job_run_time_sec=round(avg_job_run_time_sec, 2)
| table dashboard_name total_search_jobs cumulative_run_time_sec avg_job_run_time_sec total_scanned_events total_returned_results 🌟 Did this answer help you? If so, please consider: Adding karma to show it was useful Marking it as the solution if it resolved your issue Commenting if you need any clarification Your feedback encourages the volunteers in this community to continue contributing.
... View more