Hi guys,
im new in metabase and i need to audit / monitor , users operations like who, when and what runs...
which queryes creates and runs...
and with some historically deep, 6 month
can anyone helps me
thanks
bye
mauro
Hi guys,
im new in metabase and i need to audit / monitor , users operations like who, when and what runs...
which queryes creates and runs...
and with some historically deep, 6 month
can anyone helps me
thanks
bye
mauro
Hi there,
For Pro and Enterprise, you have Auditing and Query Analytics.
For all versions there's also server logs which can give you some general information when someone runs a question/query.
Hello, maybe I can help with this if you are self-hosting Metabase.
Even though in Pro and Enterprise, they offer this out of the box; the data to monitor this is available in your Metabase database if you're hosting the app/db.
So, you can connect your Metabase (application) to your Metabase DB in Databases page in Admin (https://**YOUR_METABASE_DOMAIN**.com/admin/databases
) and, with it, you can write SQL queries and create models that enables you monitoring it.
I use Metabase with PostgresDB and, this SQL below creates a table where every row is a execution of a query (a question opened). So you can see who accessed what and further details about it.
I created a full analytics view from my instance using this and other SQL queries over Metabase DB, using Metabase itself, and showing this in dashboards, give a try!
with
query_execution_data as (
SELECT
t1.id
,t1.started_at
,t1.running_time
,t1.running_time / 1000 as running_time_seconds
,t3.average_execution_time
,t3.average_execution_time / 1000 as average_execution_time_seconds
,t1.result_rows
,t1.native
,t1.context
,t1.error
,t1.executor_id
,t2.email
,t1.card_id
,t4.name
,t1.dashboard_id
,t1.cache_hit
FROM query_execution t1
left join v_users t2
on t1.executor_id = t2.user_id
left join query t3
on t1.hash = t3.query_hash
left join report_dashboard t4
on t1.dashboard_id = t4.id
left join report_card t5
on t1.card_id = t5.id
)
select * from query_execution_data
order by started_at desc