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.yaml with the configuration
  • run sudo snap restart query-exporter

Currently supported databases are:

  • PostgreSQL (postgresql://)
  • MySQL (mysql://)
  • SQLite (sqlite://)
  • Microsoft SQL Server (mssql://)
  • IBM DB2 (db2://) on supported architectures (x86_64, ppc64le and s390x)

Get it from the Snap Store

Search for another snap, or go back to the homepage.