Set up a managed database
The hands-on paths on the MySQL and PostgreSQL slides are for a database you run yourself. Amazon RDS, Amazon Aurora, Google Cloud SQL, and Azure Database use the same Database Observability features, and each has its own setup guide.
Each of those guides follows the same three steps:
- Prepare the database. Set the parameters or flags the guide lists, restart the instance when a change requires it, and create the monitoring user. For PostgreSQL, enable the
pg_stat_statementsextension in each database you want to monitor. - Configure Grafana Alloy so it can reach that instance.
- Verify that query metrics appear in Database Observability.
Reach a Cloud SQL instance
Google Cloud SQL can be reached by private IP, by public IP with authorized networks, or by the Cloud SQL Auth Proxy. When you use the proxy, point Alloy at the proxy address. Avoid sending Alloy through a load balancer or a connection pooler.
Skip the provider’s system database
Grafana Alloy 1.17 and later excludes these provider system databases by default. If you run an older Alloy, exclude the database for your service yourself. The setup guide for your service shows where to set that exclusion.
Setup guides
Choose the guide that matches your engine and your service: