Question

How are people monitoring managed Postgres query latency?

Posted April 6, 2021 157 views
PostgreSQLDatabasesDigitalOcean Managed PostgreSQL Database

I am using Postgres in production but have run into challenges around monitoring.

I’d like to be able to see when queries are slow, especially as our data grows and our access patterns grow. Right now, Digital Ocean provides a “Query Statistics” tool which provides no information about the time range, nor an ability to set one. As a result, it is not usable to see how things are changing. The statistics are (evidently) across all time. If I address a bottleneck (by adding an index for example) I cannot go to the Query Statistics tool to see the corresponding drop in latency.

This is solved by other tools, but the “managed Postgres” offering from DO is too restrictive–you can’t access the host, and you can’t create a user with the GRANTS required for Datadog to do its job. So you’re stuck?

I am curious how others are solving this? Is it unusual to use the managed DB offering for real-world production use?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hey, @andrew20, the configuration would depend on your DB architecture.
If you have a cluster with multiple Write/Read nodes, you’ll need to tweak the configuration further.

In the nutshell, I’d recommend installing Grafana and link your PostgreSQL server/cluster to it.

Here’s a good resource: https://grafana.com/blog/2019/06/03/how-postgresql-and-grafana-can-improve-monitoring-together/