Section 2 · Set up Database Observability

Configuration gaps that block Database Observability setup

Estimated time: 2 min

Before you try the hands-on path

If you decide to install and explore Database Observability, it’s important to keep in mind to start from the Configuration page.

The setup guides recommend generating your Alloy configuration from the Database Observability Configuration page. That page builds the config for your database and deployment, so you don’t have to assemble the components by hand.

If you hand-write or edit the config, these mistakes stop data from arriving.

Where setup goes wrong

PitfallWhat happensWhat to check
Incomplete Alloy configThe database_observability.mysql or database_observability.postgres component is missing its required data_source_name (the database connection) or its forward_to destination, so nothing is collected.Both data_source_name and forward_to are set on the component.
Missing endpointsThe config has no prometheus.remote_write for metrics or loki.write for logs, so telemetry is collected but never reaches Grafana Cloud.Both write blocks point at your Grafana Cloud Metrics and Grafana Cloud Logs endpoints with valid credentials.
Inconsistent job labelThe job label doesn’t use the value from the generated config (integrations/db-o11y), or the metrics and logs relabel rules don’t match, so your data isn’t labeled the way Database Observability expects.Your discovery.relabel and loki.relabel blocks both set job to integrations/db-o11y, and their rules stay consistent with each other.
Database side not preparedPerformance Schema (MySQL) isn’t enabled, or the pg_stat_statements extension (PostgreSQL) isn’t enabled in each database you want to monitor, so the built-in statistics Alloy reads don’t exist.The prerequisites for your database are in place before Alloy starts. For PostgreSQL, confirm the extension exists in each database, not only on the server.

Confirm it’s working before you troubleshoot

After Alloy is running, the Configuration page runs status checks for your instance. If data isn’t showing up, start there. A failing check points at one of the gaps above, which is faster than searching the dashboards for data that never arrived.