Overview of SQL Exporter
masterSQL Exporter is a configuration-driven tool that gathers metrics from various Database Management Systems (DBMSs) and exposes them for Prometheus to scrape.
Supported Databases:
- MySQL
- PostgreSQL
- Microsoft SQL Server
- Oracle Database
- Clickhouse
- Snowflake
- Vertica
Any DBMS with a compatible Go driver can be supported by rebuilding the binary with that driver included.
Core Concepts:
- Collectors: Logical groups of SQL queries (e.g.,
_query_stats_) mapped to specific Prometheus metrics. Collectors can be DBMS-specific or custom for application-specific data quality monitoring. - Scraping Model: Scrapes are synchronous (metrics are collected on every
/metricspoll). To manage load, you can set amin_intervalper collector to cache metrics if queried more frequently than the interval.