finds.dev

justwatchcom/sql_exporter

Flexible SQL Exporter for Prometheus.

View on GitHub

★ 501GoMITupdated Sep 2025

// the take

A Prometheus exporter that runs arbitrary SQL queries against your database and exposes the results as metrics. Works against Postgres, MySQL, ClickHouse, Snowflake, Athena, and a handful of others. If you need to turn a business query into a gauge or counter without writing a custom exporter, this covers it.

The iterator pattern is genuinely useful — you can fan a single query out across multiple databases dynamically rather than hardcoding N connection blocks. Cron scheduling alongside fixed intervals is a nice touch for metrics that only make sense daily. The non-superuser Postgres setup with SECURITY DEFINER functions is documented and works, which most similar tools skip entirely. Cloud-native integrations (CloudSQL wildcard, RDS IAM auth) are first-class, not bolted on.

501 stars and still on Travis CI with a badge that's likely broken — the maintenance posture is unclear. No concept of query timeouts; a runaway analytical query will block the scrape endpoint for however long Postgres takes. Error handling on query failure is not described — it's not obvious whether a failed query silently emits nothing or whether the scrape itself 500s. The iterator feature runs an extra query per job per scrape interval, which compounds if you're iterating over hundreds of databases with tight intervals.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
501
Forks
126
Language
Go
License
MIT
Last commit
22 Sep 2025

// nearby

If sql_exporter isn't quite it.

All repos →