Auditing is a paid feature that gives admins insight into how people are using their Metabase instance.
We’ll use the Sample Database included with Metabase to walk though some examples of how these auditing tools can help us:
- see who’s looking at what data, and
- identify opportunities to speed up our dashboards and queries.
These auditing tools are a must-have for managing compliance requirements, but they can also help us make the most out of our data.
See who’s looking at what data
In the bottom of the navigation sidebar, we’ll click on the gears icon and select Admin settings > Audit.
Who’s had access to the People table?
The audit log can help us verify that our data and collection permissions work as intended. The audit log records each table and question people view, which allows us to confirm that we’re adhering to compliance requirements.
Let’s say we want to see who’s accessed the
People table. We’ll select the Tables tab in the audit sidebar. If we hover over the bar for
Sample Database PUBLIC PEOPLE, Metabase will display a tooltip with the specific number of queries from the table. Clicking the bar will drill through to an audit log for the table.
The table audit log contains three columns:
Queried by: person who ran the question.
Query: the execution/viewing of a question.
Viewed on: when the question was last viewed.
The table audit log orders its rows by
Viewed on date and time, with the most recently viewed queries on top.
From the table audit log, we can see that the admin isn’t the only person who’s viewed the
People table. If Dr. Orange is not supposed to have access to the
People table, we could do a deeper dive and audit Dr. Orange’s account, see what queries they’ve been viewing, revoke their access in data permissions, archive any wayward queries in collections Dr. Orange has access to, and talk to them about the data they’d been viewing.
Note that if someone used a native query (like a SQL question) to access the
People table, we wouldn’t see it here. All Metabase can know about native queries is the database it queries, so we’d have to check each query individually. So be intentional about who you add to groups with SQL query access to your databases.
What has Ms. Brown seen recently?
Ms. Brown recently quit the company and we want to check what data she was looking at during her last week of employment. To see what data people have viewed, we’ll use the audit sidebar on the left to select Team members tab. This gives us a good idea of who our most active Metabase users are (figure 4).
To check Ms. Brown’s activity, we’ll click the All Members tab. The members list includes the name, groups, date joined, last active date, and signup method of each user.
We’ll click on Ms. Brown’s name to drill through to detailed information about her actions in Metabase (figure 6). The user page charts the user’s activity highlights, query views, dashboard views, and downloaded items.
How much data are people downloading?
Let’s go to the Downloads section and look at the Overview tab. From the first chart (figure 7), we can see that only four questions have been downloaded. From the chart on the bottom left, we can see which users have been downloading that data.
One of Dr. Orange’s downloads was pretty big (for the Sample Database, at least): 1,112 rows of data. Click on the All downloads tab to see what Dr. Orange downloaded that had so many rows.
Towards the top of the list we can see that Dr. Orange’s download was a query titled Reviews. If we want more information, we can click into the question and select Open in Metabase.
Optimizing our Metabase instance
We can also use the audit logs to find opportunities to make our dashboards load faster, or help people find the data they need by making sure people are using dashboards they can trust.
Why is CA Marketing Dashboard loading slowly?
Let’s say there have been some complaints about the CA Marketing Dashboard’s slow load times. In the audit sidebar’s Databases section, we can see a summary of total queries and their average run time.
The Sample Database’s load time is less than a second, so we know the database at large isn’t slowing anything down. Maybe the loading problem is with the dashboard itself?
Let’s go to the Audit section and select
CA Marketing Dashboard from the graph of most popular dashboards. In the dashboards’ personalized page, we can see that this dashboard does indeed take a while to load, so we’ll click on the Revision History tab to see what changes people have made to the dashboard that might have affected load times.
Here we can see that a user recently added a card to the dashboard. That card is probably what’s slowing down the dashboard.
Important People increase its views?
Let’s say we recently pinned a key question,
Important People, to its collection, and want to see if pinning it has helped drive traffic to the question. In the Questions section’s Overview tab, we’ll see two charts: the most popular queries and the slowest loading queries.
To find a specific questions, we’ll open the All Questions tab and select
Important People from the list.
Did this article help you?
Thanks for your feedback!