Commit Graph

22 Commits

Author SHA1 Message Date
Will Rouesnel
a95fad8d1e Refactor scrape() to break out the major components.
This puts us on the road to dropping the bash tests and doing it all in
Go.
2016-11-17 02:16:45 +11:00
Will Rouesnel
f554139279 Add pg_static synthetic key to collect Postgres version.
Similar to the node_exporter, this key is synthetic and used to create
a constant metric which records the version strings of PostgreSQL in its
labels.
2016-11-17 01:59:46 +11:00
Will Rouesnel
c00d3fb6e7 Revert PR #23 which broke replication stats.
This PR is not general to all versions of postgres, and in the worst case
meant the query returned nothing.

Closes #30 and shows we need a test case.
2016-11-17 00:16:21 +11:00
Will Rouesnel
6f2f9890f7 Change default port to 9187.
This is the postgres_exporter WIP port for Prometheus and avoids the
by default collision with the nginx_exporter.

Closes #22.
2016-11-16 23:02:42 +11:00
Will Rouesnel
286550f3bf Merge pull request #21 from ncabatoff/feature-queries_from_file
Feature queries from file
2016-09-09 01:10:15 +10:00
Mickaël Canévet
83bf7840f5 Add slot_name to pg_stat_replication 2016-09-08 15:24:42 +02:00
Nick Cabatoff
b3bb44082a merge with upstream 2016-09-07 16:29:30 -04:00
Nick Cabatoff
fc3a14f645 fix bug with multiple columns in same metric (only the last one was being used because the map was being overwritten each time); add -dumpmaps option for debugging 2016-08-20 12:32:08 -04:00
Travis Cline
09a998035d update to use common/log 2016-08-05 18:54:41 -07:00
Will Rouesnel
9cdd620449 Merge pull request #6 from marcusmartins/duration_handling
Handle `pg_runtime_variable` return values
2016-07-30 11:48:44 +10:00
Brian Sutherland
0830d3e098 Parse strings to floats. fixes https://github.com/wrouesnel/postgres_exporter/issues/15 2016-07-28 12:59:28 +02:00
Will Rouesnel
8cca2a59a5 Add docker based integration test suite.
This simply pulls and runs postgres against a number of versions and checks
that we can successfully connect to it.
2016-07-16 12:41:34 +10:00
Reda NOUSHI
895166bbbb Made cosmetic changes to fit the Go coding standards 2016-06-29 22:09:42 +00:00
Reda NOUSHI
c0ae101d89 Add support for custom queries from yaml file 2016-06-29 00:32:47 +00:00
Reda NOUSHI
6565c98ad5 Add queries file support 2016-06-28 23:56:47 +00:00
Will Rouesnel
2711bd78d3 Modifications to setup .travis.yml and builds. 2016-05-28 14:31:43 +10:00
Marcus Martins
2a8bef5235 Handle pg_runtime_variable return values
When querying postgres `pg_runtime_variable`, postgres might return -1
for `max_standby_archive_delay` and `max_standby_streaming_delay`
2016-05-05 18:07:27 -07:00
fiknytte
7e8fbdf07f Added support for collecting arbitrary sql queries.
Added metrics for locks per database per mode, pg_stat_activity, pg_stat_replication.
Updated README.md with possible solution for running as non-superuser.
2016-01-21 13:15:20 +01:00
William Rouesnel
01e4eb4e67 Add support for collecting runtime variables. 2015-12-09 16:41:28 +11:00
Will Rouesnel
ddf582dcdf Fix the column labeling properly. 2015-08-28 06:58:59 +10:00
Will Rouesnel
c92bb1e610 Add explicit type conversion functions from sql to prometheus. 2015-08-28 04:27:36 +10:00
Will Rouesnel
2a08787a90 Compiling version of the postgres_exporter.
This is based on the mysqld_exporter, but drastically changes how metrics are
discovered and enumerated since postgres already very closely follows the
Prometheus format.
2015-08-25 03:28:41 +10:00