Run Database Observability on clustered Grafana Alloy
Database Observability now supports Grafana Alloy clustering for MySQL and PostgreSQL. When you run several Alloy nodes with the same configuration, Alloy assigns each database to exactly one node. Telemetry collection is distributed across the cluster and automatically moves to another node if one becomes unavailable, without duplicating data.
Clustering also works with a single database. If you run more than one Alloy node, you get a highly available setup with no extra configuration.
How it works
To run Database Observability in clustered mode, update your database_observability.mysql or database_observability.postgres component:
Define all your databases as
database_instanceblocks in one component, instead of using one component per database.Add the
clusteringblock withenabled = true.Configure the component’s embedded exporter in order to replace the separate exporter component. Enable the collector that the Database Observability app uses in the
prometheus_exporterblock:- PostgreSQL:
enabled_collectors = ["stat_statements"] - MySQL:
enable_collectors = ["perf_schema.eventsstatements"]
- PostgreSQL:
With the next Alloy release (1.21), step 3 won’t be required.
Currently, all databases in a clustered component share the same tuning settings, and you can’t relabel telemetry per database yet.
Get started
Clustering for Database Observability is available now in Grafana Alloy 1.20 and later. To learn more, see the Alloy clustering documentation.