Monitoring dashboard response time and usage

Flex

Monitoring dashboard response time via JMX

  • Use a JMX client such as jconsole and connect to the application
  • In the MBeans tree, open the node com.systar.nitrogen.dashboards.impl.jmx.DashboardStatsMXBean

You have then access to the following counters:

Counter Description
DashboardAvgLoadingTimeMillis

Returns the time (expressed in milliseconds) required - in average - to load a dashboard, including the rendering time on the client's side

DashboardAvgRefreshTimeMillis Returns the time (expressed in milliseconds) required - in average - to refresh a dashboard, including the rendering time on the client's side
DisplayedDashboardCount

Returns the number of dashboards that have been displayed so far.

If the same dashboard is displayed several times by the same user or by different users, it is counted several times

You can also reset these counters using the resetCounters operation.

To obtain these details for each dashboard, ask the deployment to write a log event each time a dashboard is loaded or refreshed in a browser.

Monitoring individual dashboard response time and usage

An event can be logged each time a user loads or refreshes a dashboard in a browser.

These events are written into the standard log file or into a dedicated csv file. The format of these log lines is:

event,title,uuid,time,user

where

event

One of the following values:

  • Dashboard loaded: A user has navigated onto this dashboard. time represent the time that has been required to load the dashboard including data
  • Dashboard refreshed: The time machine has changed and the dashboard data have been refreshed (either because the time machine is set to Live and the dashboard auto-refreshed itself or because a user has changed the time machine value)
title Title of the dashboard
uuid UUID of the dashboard
time Time required to fully load or refresh the dashboard
user Username of the user that has loaded or refreshed the dashboard

Via the standard log file

To write a line in the node.log file when a dashboard is loaded or refreshed, simply change the log level for dashboards.dashboardStats in conf/log4j.properties from WARN to INFO:

conf/log4j.properties
# Dashboard statistics logs
log4j.logger.dashboards.dashboardStats=INFO 

It will produce log lines similar to:

2014-04-14 18:02:49,903 [1381876328@qtp-554977315-0] INFO dashboards.dashboardStats - Dashboard loaded,HOME,00000002-0001-0001-13ae-b03704500001,237,hharris
2014-04-14 18:03:05,136 [966811659@qtp-554977315-15] INFO dashboards.dashboardStats - Dashboard loaded,LOST & STUCK,00000002-0001-0001-13a9-32603a200001,1255,mtaylor
2014-04-14 18:03:14,489 [883931400@qtp-554977315-12] INFO dashboards.dashboardStats - Dashboard refreshed,LOST & STUCK,00000002-0001-0001-13a9-32603a200001,555,mtaylor
2014-04-14 18:03:20,981 [307890281@qtp-554977315-16] INFO dashboards.dashboardStats - Dashboard refreshed,LOST & STUCK,00000002-0001-0001-13a9-32603a200001,641,admin

Via a dedicated csv file

To have these logs dumped in a separate dashboards-stats.csv file, ready to be loaded into a spreadsheet such as Microsoft Excel, change the following line in  conf/log4j.properties  from:

conf/log4j.properties
# Dashboard statistics logs
log4j.logger.dashboards.dashboardStats=WARN

to:

conf/log4j.properties
# Dashboard statistics logs, only in dashboards-stats.csv
log4j.appender.DashboardStatsFile=org.apache.log4j.FileAppender
log4j.appender.DashboardStatsFile.file=dashboard-stats.csv
log4j.appender.DashboardStatsFile.layout=org.apache.log4j.PatternLayout
log4j.appender.DashboardStatsFile.layout.conversionPattern=%m%n
log4j.logger.dashboards.dashboardStats=INFO,DashboardStatsFile
log4j.additivity.dashboards.dashboardStats=false

It will produce log lines similar to:

Dashboard loaded,HOME,00000002-0001-0001-13ae-b03704500001,529,hharris
Dashboard loaded,ABOVE PROFILE,00000002-0001-0001-13a9-325e02c00001,2505,hharris
Dashboard refreshed,ABOVE PROFILE,00000002-0001-0001-13a9-325e02c00001,706,mtaylor

HTML

Monitoring individual dashboard usage

An event is logged each time a user loads or refreshes a dashboard in a browser.

These events are written into the log file dedicated to metrics named metric.log

The metric log file is made of JSON lines. 

Each line will contain the following JSON attributes:

time The event time in ISO8601 format
metric For dashboard event, the metric value is: Dashboard displayed
args uuid

UUID of the dashboard

action

One of the following values:

  • loaded: A user has navigated onto this dashboard, or the mini dashboard is displayed
  • refreshed: The time machine has changed and the dashboard data have been refreshed (either because the time machine is set to Live and the dashboard auto-refreshed itself or because a user has changed the time machine value)
title Title of the dashboard
user Username of the user that has loaded or refreshed the dashboard
  • The metric.log can contains other kind of metric differentiated by the metric value. Only the lines where metric value is Dashboard displayed have the described format for the args attribute.
  • The metric.log file parsing must be able to ignore attributes that are unknown.


Example:

{"time": "2018-01-24 19:52:16,513", "metric": "Dashboard displayed", "args": {"uuid": "00000000-f002-0000-1612-97f7f1300801", "action": "loaded", "title": "User", "user": "admin"}}
{"time": "2018-01-24 19:53:00,408", "metric": "Dashboard displayed", "args": {"uuid": "00000000-f002-0000-1612-97f7f1300801", "action": "refreshed", "title": "User", "user": "admin"}}
{"time": "2018-01-24 19:54:00,444", "metric": "Dashboard displayed", "args": {"uuid": "00000000-f002-0000-1612-97f7f1300801", "action": "refreshed", "title": "User", "user": "admin"}}
{"time": "2018-01-24 19:55:00,471", "metric": "Dashboard displayed", "args": {"uuid": "00000000-f002-0000-1612-97f7f1300801", "action": "refreshed", "title": "User", "user": "admin"}}


Related Links