Requirements and overhead
Review system requirements, database permissions, and performance impact before setting up Database Observability. This page covers what you need to run Alloy, what access your monitoring user requires, and how much overhead to expect on your databases.
System requirements
Grafana Cloud
| Requirement | Details |
|---|---|
| Account | Grafana Cloud account with Editor or Admin role |
| Stack | Access to Grafana Cloud Mimir (metrics) and Grafana Cloud Loki (logs) data sources |
| Permissions | Ability to view and create dashboards |
Grafana Alloy
| Requirement | Details |
|---|---|
| Version | Grafana Alloy 1.15.0 or later |
| Network | Outbound access to Grafana Cloud endpoints |
| Database access | Network connectivity to monitored databases |
PostgreSQL requirements
| Requirement | Minimum version | Notes |
|---|---|---|
| PostgreSQL | 14 | PostgreSQL 13 and earlier are not supported |
pg_stat_statements | Required | Extension must be installed and enabled; requires restart |
| Monitoring user | Required | User with pg_monitor and pg_read_all_stats roles |
For detailed configuration and permission setup, refer to Set up PostgreSQL.
MySQL requirements
| Requirement | Minimum version | Notes |
|---|---|---|
| MySQL | 8.0 | MySQL 5.7 and earlier are not supported |
| MariaDB | Not supported | Performance Schema implementation differs from MySQL |
Performance Schema | Required | Enabled by default in MySQL 8.0+ |
| Monitoring user | Required | User with PROCESS, REPLICATION CLIENT, and SELECT privileges on performance_schema |
For detailed configuration and permission setup, refer to Set up MySQL.
Performance overhead
Database Observability is designed to minimize impact on your production databases. Understanding the overhead helps you make informed decisions about collection intervals and features.
Database query overhead
The monitoring queries executed by Alloy are lightweight read operations:
| Query type | Database | Notes |
|---|---|---|
pg_stat_statements | PostgreSQL | Reads cached statistics |
pg_stat_activity | PostgreSQL | Reads active session info |
Performance Schema | MySQL | Reads cached statistics |
| Query samples (MySQL) | MySQL | Captures running queries |
| Query samples (PostgreSQL) | PostgreSQL | Captures running queries |
| Schema details | Both | Cached, reads metadata |
| Explain plans | Both | Runs EXPLAIN on sampled queries |
Explain plan considerations:
Explain plans execute EXPLAIN (not EXPLAIN ANALYZE) on sampled queries. This operation:
- Does not execute the query
- Uses cached statistics to estimate costs
- Has minimal overhead for most queries
- Can be disabled if needed via collector configuration
Reduce overhead
If you need to reduce monitoring overhead:
- Increase collection intervals: Change
collect_intervalfrom 1 minute to 5 minutes - Reduce explain plan sampling: Set
explain_plans.per_collect_ratioto0.5or lower - Exclude schemas: Use
exclude_schemas(MySQL) orexclude_databases(PostgreSQL) to skip non-critical databases
Checklist before setup
Before proceeding with setup, verify:
- Grafana Cloud account is active with appropriate permissions
- Database version meets minimum requirements
- Required extensions/features are enabled (
pg_stat_statements,Performance Schema) - Network connectivity exists between Alloy location and databases
- Network connectivity exists between Alloy location and Grafana Cloud
- Monitoring user credentials are ready
- Database team is aware of monitoring overhead expectations
Related documentation
- Set up PostgreSQL: Complete PostgreSQL setup guide
- Set up MySQL: Complete MySQL setup guide
Was this page helpful?
Related resources from Grafana Labs


