Commit Graph

100 Commits

Author SHA1 Message Date
Will Rouesnel
a7ff84a674 Update vendored tools/. 2017-08-04 02:30:33 +10:00
Giancarlo Rubio
1afbd62ab1 Sample for database size (#76) 2017-07-26 22:53:16 +10:00
Alexander Savchuk
81194c9219 Grant postgres_exporter role to deployer role
If the deployer role is not superuser (which is the case in AWS RDS,
for example), we need to grant it access to postgres_exporter role
before we can create a schema with AUTHORIZATION postgres_exporter.
2017-06-09 20:04:27 +10:00
Alexander Savchuk
1ec400b707 Fix PostgreSQL name
PostgreSQL name was misspelled in
53b9d9cea7.
2017-06-09 20:04:27 +10:00
Will Rouesnel
3b9a68897f Fix overbroad tools .gitignore. 2017-06-07 00:53:19 +10:00
Will Rouesnel
f5c88e1806 Update tools/Makefile. 2017-06-07 00:53:19 +10:00
Will Rouesnel
801793e185 Update .travis.yml. 2017-06-07 00:53:19 +10:00
Will Rouesnel
8877b69804 Fix an extraneous comma which bugged the SQL introduced when merging PR #78
See commit 0de0311c22. The SQL for <9.2 had a
typo which we somehow missed, caught by integration testing.
2017-06-07 00:53:19 +10:00
Will Rouesnel
3f0fb9d3a4 Suppress build messages from tools/Makefile 2017-06-07 00:53:19 +10:00
Will Rouesnel
8a1a12fd05 Update Makefile test handling. 2017-06-07 00:53:19 +10:00
Will Rouesnel
34ffcb449d Fix issues identified by the gometalinters. 2017-06-07 00:53:19 +10:00
Will Rouesnel
4477dfa9b3 Add warning if Postgres Version is lower then the minimum version. 2017-06-07 00:53:19 +10:00
Will Rouesnel
e2b6c973a1 Add self-contained gometalinter build tooling. 2017-06-07 00:53:19 +10:00
Guo Xiang Tan
0de0311c22 Ignore functions that cannot be executed during recovery.
https://github.com/wrouesnel/postgres_exporter/issues/52
2017-06-07 00:02:49 +10:00
Tyler Yahn
5c587cb725 Add CLI flag to return version info
Fixes wrouesnel/postgres_exporter#67.
2017-06-06 23:57:30 +10:00
Heikki Hulkko
1bf7f2435f Add confirmed_flush_lsn to pg_stat_replication 2017-06-06 23:51:34 +10:00
Adam Sunderland
1fa394d488 Remove pg_settings query examples
These fields are now automatically scraped so they will conflict if they are accidentally specified.
2017-04-24 00:01:39 -10:00
Will Rouesnel
c4f701e817 Fix the .travis.yml deployment. 2017-04-18 23:25:56 +10:00
Adam Sunderland
a87b6bc583 Handle pg_settings names with '.' 2017-04-18 23:11:14 +10:00
Matt Bostock
98ba566322 Use the pg_settings view to retrieve runtime variable
Adds all bool/integer/real runtime variables that can be retrieved ths way.

Use the `pg_settings` view to retrieve runtime variables:
https://www.postgresql.org/docs/current/static/view-pg-settings.html

Replaces the use of `SHOW` to retrieve runtime variables.

Only runtime variables with a `vartype` of `bool`, `real`, or `integer`
are currently supported. Uses the `short_desc` field as a description.

This commit deprecates the following metric names:
```
pg_runtime_variable_max_connections
pg_runtime_variable_max_files_per_process
pg_runtime_variable_max_function_args
pg_runtime_variable_max_identifier_length
pg_runtime_variable_max_index_keys
pg_runtime_variable_max_locks_per_transaction
pg_runtime_variable_max_pred_locks_per_transaction
pg_runtime_variable_max_prepared_transactions
pg_runtime_variable_max_standby_archive_delay_milliseconds
pg_runtime_variable_max_standby_streaming_delay_milliseconds
pg_runtime_variable_max_wal_senders
```

They are replaced by equivalent names under `pg_settings` with the exception of
```
pg_runtime_variable_max_standby_archive_delay_milliseconds
pg_runtime_variable_max_standby_streaming_delay_milliseconds
```
which are replaced with
```
pg_settings_max_standby_archive_delay_seconds
pg_settings_max_standby_streaming_delay_seconds
```

Adds approximately 195 new metrics, when considered across all supported
PostgreSQL versions.
2017-04-14 02:09:44 +10:00
Will Rouesnel
994be318d4 Add metric parsing scripts to generate additions/removals for complex changes.
These scripts hold some learnings on how to compare changes to the metric
profile of the exporter. In future we'll teach travis to build this against
master automatically and post a comment back to a PR with what's been changed.

For now we just want to store them.
2017-04-14 01:57:51 +10:00
Will Rouesnel
f6e4292bc5 Have smoketests output representative samples of metrics.
Future: build the current master and produce a comparison.
2017-04-14 01:21:31 +10:00
Michał Czeraszkiewicz
53b9d9cea7 Improve "Running as non-superuser" documentation.
Closes #53 (rebased and merged).
2017-04-14 00:49:31 +10:00
Dimitrios Karagiannis
12b95c44d4 Mask the password field of the connection URL.
This solves the issue where failed connections can leak the database connection
string to logs.
2017-04-14 00:44:48 +10:00
Christian Nicolai
030e90f03e Update build version of Go to 1.7.5
Includes fix for this issue: https://github.com/golang/go/issues/16739
2017-04-14 00:42:41 +10:00
Matt Bostock
c7ac2b0e12 Make references to PostgreSQL consistent
While many pronounce it as 'post-GRES', the spelling is 'PostgreSQL' with two 's'.

https://www.postgresql.org/about/press/faq/
2017-03-04 02:56:35 +11:00
Will Rouesnel
5211415ebe Gofmt the code. 2017-02-25 01:18:27 +11:00
Will Rouesnel
ff8e0c5382 Add coverage and code quality badges. 2017-02-25 01:18:27 +11:00
Jim Tilander
8ded56a7da Better error message for debugging connection failures 2017-02-17 01:10:13 +11:00
Jim Tilander
f5f7d836f5 Removed dependency on local build 2017-02-17 01:10:13 +11:00
Jim Tilander
03ee288c3a Added a cross compilation target as well as push 2017-02-17 01:10:13 +11:00
matevarga
623d2eb6de Using a connection pool of size 1 instead
of closing/reopening connections
2017-02-07 21:06:15 +11:00
Ed Schouten
2c6594edca Properly print the SQL server error string in the log message.
On a Debian + PostgreSQL 9.4 system I had a hard time getting the
exporter to work. It looks like I was running into some authentication
issues that weren't logged by sql.Open(), but by sql.DB.QueryRow().

This change extends the warning generated by the call to
checkMapVersions() to also print the error message generated by
sql.DB.QueryRow().
2017-01-10 01:32:14 +11:00
Will Rouesnel
1e43282aa2 Update .travis.yml to push tagged versions. 2016-11-29 07:49:34 +11:00
Will Rouesnel
8ec2d3d73c Remove the spurious config.expect-replication-stats option.
This was something that was going to be added but never materialized into a practical feature.
2016-11-29 07:44:38 +11:00
Will Rouesnel
3ead0f9aff Add a test case to detect regression on issue fixed by PR #39.
Related issue is #38. Time to start expanding functional test coverage since
the integration tests missed this.
2016-11-29 02:32:23 +11:00
Dominik Schulz
8f3088611b Use correct SemVer range condition. Fixes #38 (#39) 2016-11-29 01:49:25 +11:00
Alex Simenduev
37e6dd3bec Update Dockerfile with the new port (9187) (#37) 2016-11-26 13:06:23 +11:00
Will Rouesnel
22534f7cd6 Merge pull request #36 from mjtrangoni/patch-1
README.md: Update to new default port 9187
2016-11-21 21:58:34 +11:00
Mario Trangoni
cd9bb8605e README.md: Update to new default port 9187 2016-11-21 09:50:15 +01:00
Will Rouesnel
e3ba4b3c5d Merge pull request #33 from wrouesnel/bugfixes_and_upgrades
Bugfixes and upgrades
2016-11-18 03:58:26 +11:00
Will Rouesnel
98d26cb9c7 Update the integration test. 2016-11-18 03:52:58 +11:00
Will Rouesnel
9f1835bb2d Vendor new packages, fix bad sync dependency. 2016-11-18 03:45:42 +11:00
Will Rouesnel
1246d1b90b Update .travis.yml to push tagged docker container releases. 2016-11-18 03:42:36 +11:00
Will Rouesnel
d49127d34f Re-enabled the YAML file format processing. 2016-11-18 03:32:16 +11:00
Will Rouesnel
2297eb5ba8 Tests passing for all postgres versions. 2016-11-18 02:47:24 +11:00
Will Rouesnel
be1a76b167 Tests passing for PostgreSQL 9.1. Set semantic version in filename. 2016-11-18 02:26:33 +11:00
Will Rouesnel
175686dc0f Use the gocheck binary to run Postgres matrix tests. 2016-11-17 22:14:13 +11:00
Will Rouesnel
045ae96430 Implement the compileable source code of the basic integration test suite.
This is the first step in moving the integration test suite to a more
reliable Golang based one.
2016-11-17 03:09:20 +11:00
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