codeinsights-db is missing metrics on grafana dashboard
Created by: michaellzc
Steps to reproduce:
- go to http://k8s.sgdev.org/-/debug/grafana/d/postgres/postgres?orgId=1
- check active connections panel, you shall not see connection counts for codeinsights-db but only code-intel and pgsql
Expected behavior:
Whatever pg metrics that are available for code-intel and pgsql should also be visible for codeinsights-db
Actual behavior:
They're not there
Notes
we explictly excluded the db psotgres https://github.com/sourcegraph/sourcegraph/blob/main/monitoring/definitions/postgres.go#L32
I am not sure what's the best way to fix this. For pgsql and codeintel-db, we are using the database named sg
. Because the default postgres
will always be created, we excluded postgres
in the prom query to reduce noise (reason being we don't use them in other two postgres instances). The thing is, for codeinsights-db, we're actually using the postgres
database.
I suppose we need to tune the query to make sure metrics of postgres
from codeinsights-db are included, but metrics of postgres
from the other postgres instances are still excluded.