Reputation: 12231
Does anyone have a way to determine how often dashboards are accessed and which are not used at all? It'd be nice to have a way to prune never used/broken dashboards when the number of dashboards is > 1k. Setting the log levels to 'Trace' does not provide any information that would be usable in this situation.
Upvotes: 2
Views: 1949
Reputation: 1500
According to Grafana configuration docs you need to enable
router_logging option in /etc/grafana/grafana.ini
:
Set to true for Grafana to log all HTTP requests (not just errors). These are logged as Info level events to grafana log.
Then you can find dashboard requests in /var/lib/grafana/grafana.log
like this:
t=2017-12-07T11:53:55+0300 lvl=info msg="Request Completed" logger=context userId=0 orgId=3 uname= method=GET path=/api/dashboards/db/
<name-of-your-dashboard-here>
status=200 remote_addr=.....
So you be able to filter and parse logs to extract dashboard usage stats.
Upvotes: 3