Skip to content

Add SQL queries rate to Controller Dashboard

Quang-Minh Nguyen requested to merge qmnguyen/improve-sql-queries-metrics into master

Although the rapid action about shifting primary queries to the replicas is going to the end, I found it useful to have a panel to watch for the SQL queries rate to replica/primary databases. It's convenient to have the data before and after an optimization. The prometheus metrics are long-term, hence we can look in in a very far away in the past.

For example, this is a panel showing the reduction of queries to the primary:

Screen_Shot_2021-04-01_at_15.26.21

https://dashboards.gitlab.net/dashboard/snapshot/UrQsiuvKXW22scD866sGBXneGF0IY8Mr?viewPanel=1266521010&orgId=1&var-PROMETHEUS_DS=Global&var-environment=gprd&var-stage=main&var-controller=Projects::IssuesController&var-action=index&from=1616456535568&to=1616561616649

I don't add this panel to the stage group dashboards because they are already very dense already.

Merge request reports