Dashboards & Visualizations

How can I measure the dashboard load time ?

sidhantbhayana
Path Finder

Hi Guys,

I need to measure dashboard load time and the size of all searches in a dashboard.

Thanks in advance.

Best,
SB

Tags (2)
0 Karma
1 Solution

mdorobek
Path Finder

Run this search after loading your Dashboard

`dmc_audit_get_searches(YourServer)`       | stats min(_time) as _time, values(user) as user, max(total_run_time) as total_run_time, first(search) as search, first(search_type) as search_type, first(apiStartTime) as apiStartTime, first(apiEndTime) as apiEndTime by search_id       | where isnotnull(search) AND search_type="ad hoc" | search user="*" | fields search, total_run_time, _time, apiStartTime, apiEndTime, search_type, user | eval earliest = case(     like(apiStartTime, "%ZERO_TIME%") AND like(apiEndTime, "%ZERO_TIME%"), "all time",     like(apiStartTime, "%ZERO_TIME%"), "-",     1 == 1, apiStartTime ) | eval latest = case(     like(apiStartTime, "%ZERO_TIME%") AND like(apiEndTime, "%ZERO_TIME%"), "all time",     like(apiEndTime, "%ZERO_TIME%"), "-",     1 == 1, apiEndTime ) | eval search = if(isnotnull(search), search, "N/A") | `dmc_time_format(_time)` | sort - total_run_time | eval total_run_time = `dmc_convert_runtime(total_run_time)` | fields search, total_run_time, _time, earliest, latest, search_type, user | rename search as Search, total_run_time as "Search Runtime", _time as "Search Start", earliest as "Earliest Time", latest as "Latest Time", search_type as Type, user as "User"        

View solution in original post

mdorobek
Path Finder

Which Version of Splunk do you run currently? I took the macro out of the Monitoring Console which came with 6.3 or 6.4 I think.

0 Karma

mdorobek
Path Finder

You can find the macros in: Settings->Advanced search->search macros.
Select "Monitoring Console (splunk_monitoring_console)" as App context.

0 Karma

jagadeeshm
Contributor

I have 6.4.3.

0 Karma

mdorobek
Path Finder

Run this search after loading your Dashboard

`dmc_audit_get_searches(YourServer)`       | stats min(_time) as _time, values(user) as user, max(total_run_time) as total_run_time, first(search) as search, first(search_type) as search_type, first(apiStartTime) as apiStartTime, first(apiEndTime) as apiEndTime by search_id       | where isnotnull(search) AND search_type="ad hoc" | search user="*" | fields search, total_run_time, _time, apiStartTime, apiEndTime, search_type, user | eval earliest = case(     like(apiStartTime, "%ZERO_TIME%") AND like(apiEndTime, "%ZERO_TIME%"), "all time",     like(apiStartTime, "%ZERO_TIME%"), "-",     1 == 1, apiStartTime ) | eval latest = case(     like(apiStartTime, "%ZERO_TIME%") AND like(apiEndTime, "%ZERO_TIME%"), "all time",     like(apiEndTime, "%ZERO_TIME%"), "-",     1 == 1, apiEndTime ) | eval search = if(isnotnull(search), search, "N/A") | `dmc_time_format(_time)` | sort - total_run_time | eval total_run_time = `dmc_convert_runtime(total_run_time)` | fields search, total_run_time, _time, earliest, latest, search_type, user | rename search as Search, total_run_time as "Search Runtime", _time as "Search Start", earliest as "Earliest Time", latest as "Latest Time", search_type as Type, user as "User"        

View solution in original post

Learner
Path Finder

hi @mdorobek , 

i have same doubt. i tried your query but it gives me error at each 'dmc'. as you further said, check on macros but there also i don't find out anything. as i am to new to splunk i am interesting to learn. thanks in advance

0 Karma

mdorobek
Path Finder

Hello @Learner,

at first you need to setup the monitoring console:

https://docs.splunk.com/Documentation/Splunk/8.0.5/DMC/DMCoverview

If you have a distributed environment heres a guide:

https://docs.splunk.com/Documentation/Splunk/8.0.5/DMC/Configureindistributedmode

 

The monitoring console is a Splunk Enterprise monitoring tool. It lets you view detailed topology and performance information about your Splunk Enterprise deployment. 
The search is taken from the monitoring console. You can find the search performance dashboards at "Search->Activity". 
The macro is defined in the context of the monitoring console. 
I hope this helps you.



 

0 Karma

manuelostertag
Path Finder

@mdorobek
Thanks, works under 7.2.8 like a charm.

0 Karma

jagadeeshm
Contributor

Where is this macro defined? My splunk installation can not find it.

0 Karma