This repository contains a rich collection of SQL queries for monitoring a Metabase instance. Metabase is a robust Business Intelligence tool, and these analytics provide an extra layer of insight into your Metabase usage. The queries offer information on aspects such as execution time statistics, usage frequency by time, user activity, broken queries, and more.
To utilize these queries, ensure you have an instance of Metabase running and have access to the underlying database. The queries are primarily designed for PostgreSQL.
Each SQL file in this repository corresponds to a unique monitoring query. Here are brief descriptions of each query, including the new additions:
- Median Query Execution Time: Provides the median and maximum execution time for each query.
- Query Frequency by Day, Week, and Hour: Measures the frequency of queries run by day of the week and hour.
- Dashboard Activity by Topic: Summarizes activities performed on each dashboard.
- Query Performance Clustering: Groups queries based on their execution times.
- User Activity Metrics: Measures the number of questions viewed and the number of active days for each user.
- Identifying Broken Queries: Lists all broken queries along with their error messages, creators, and the last queried times.
- Most Updated Queries Analysis: Provides information on the most frequently updated queries.
- No Execution Queries Identification: Lists queries that have not been executed recently.
- Tool Spot Metrics: Detailed log of specific query usage.
- Dashboard Usage Statistics: Shows usage statistics for each dashboard, including user and view count.
- Real Time Dashboard Usage: Returns real-time usage information for selected dashboards.
- Users Activity Dashboard: Summarizes dashboard viewing activity and active days for each user.
- Dashboard by Maintenance Type: Lists dashboards by the frequency of maintenance operations performed on them.
- Real Time Dashboard Usage by Dashboard: Provides real-time usage statistics for each dashboard.
- Most Updated Queries: Lists the most frequently updated queries in specified dashboards.
- Dashboard Usage by Day: Presents daily usage statistics for selected dashboards.
- Dashboard Usage by Dashboard: Summarizes usage statistics for each dashboard over the past 30 days.
- Dashboard Usage by User: Provides usage statistics for each dashboard by user.
Contributions are warmly welcomed! If you have a query that you think would be beneficial, please feel free to create a pull request.