- Description
- Setup - The basics of getting started with postgres_exporter
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Installs the Prometheus Postgres Exporter.
To configure a basic default postgres_exporter, declare the postgres_exporter class.
class { 'postgres_exporter':
}
All parameters for the postgres_exporter module are contained within main postgres_exporter
, so for any function of the module set the options you want. See the main usage below for examples.
Install and enable postgres_exporter
include postgres_exporter
Configure the datasource
class { 'postgres_exporter':
datasource => 'postgresql://postgres:password@localhost:5432/?sslmode=disable',
}
Use the flags
class { 'postgres_exporter':
flags => {
'web.listen-address' => ':9999',
'web.telemetry-path' => '/apis',
},
}
Add custom queries
class { 'postgres_exporter':
flags => {
'extend.query-path' => '/opt/postgres_exporter/query.yaml',
},
}
You need provided the file query.yaml
before. A example of format is available queries.yaml
Others parameters can be used see postgres_exporter
Tested on Centos 7, but should be fine on any Linux that uses Systemd.
In the Development section, tell other users the ground rules for contributing to your project and how they should submit their work.