query-exporter is a Prometheus exporter which allows collecting metrics from database queries, at specified time intervals or when a request to the metrics endpoint is performed.
Each query can be run on multiple databases, and update multiple metrics.
The snap provides both the
query-exporter command and a deamon instance of
the command, managed via a Systemd service.
To run the latter:
- create or edit
/var/snap/query-exporter/current/config.yamlwith the configuration
sudo snap restart query-exporter
Currently supported databases are:
- PostgreSQL (
- MySQL (
- SQLite (
- Microsoft SQL Server (
- IBM DB2 (
db2://) on supported architectures (x86_64, ppc64le and s390x)