This chart bootstraps a Prometheus Postgres exporter deployment on a Kubernetes cluster using the Helm package manager. Prometheus exporter for PostgreSQL server metrics. Supported Postgres versions: 9.1 and up. This repository contains a service that runs user-defined SQL queries at flexible intervals and exports the resulting metrics via HTTP for Prometheus consumption.

Installing the Chart

To install the chart with the release name my-release:

$ helm install –name my-release stable/Prometheus-Postgres-exporter

The command deploys Postgres exporter on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.

The dashboard allows to monitor:

  • rows fetched/returned/inserted/updated/deleted per second
  • total qps based on commits and rollbacks
  • buffers state
  • deadlocks and conflicts graph
  • cache hit ratio graph
  • number of active connections

The author assumes that the metrics are scraped from various hosts and databases. That’s why there are placed two templates: $host and $db. Graphs would change accordingly to the selected value.

Requirements: Dashboard is based on the metrics

Disabling default metrics

To work with non-officially-supported Postgres versions you can try disabling (e.g. 8.2.15) or a variant of Postgres (e.g. Greenplum) you can disable the default metrics with the –disable-default-metrics flag. This removes all built-in metrics and uses only metrics defined by queries in the queries.yaml file you supply (so you must supply one, otherwise the exporter will return nothing but internal statuses and not your database).

Tell us about a new Kubernetes application


Never miss a thing! Sign up for our newsletter to stay updated.


Discover and learn about everything Kubernetes