forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add username/pass options for PostgreSQL (elastic#2890) (elastic#2906)
Similar to elastic#2889 but for PostgreSQL. Also adds docs to the Postgres module, which were missing, and adjusted the integration tests to use the username option instead of the full URL. (cherry picked from commit f0b52e1)
- Loading branch information
1 parent
4ab0a6c
commit d867eb1
Showing
18 changed files
with
380 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,50 @@ | ||
== postgresql Module | ||
== PostgreSQL Module | ||
|
||
This is the postgresql Module. | ||
This module periodically fetches metrics from | ||
https://www.postgresql.org/[PostgreSQL] servers. | ||
|
||
[float] | ||
=== Module-Specific Configuration Notes | ||
|
||
When configuring the `hosts` option, you must use Postgres URLs of the following | ||
format: | ||
|
||
----------------------------------- | ||
[postgres://][user:pass@]host[:port][?options] | ||
----------------------------------- | ||
|
||
The URL can be as simple as: | ||
|
||
[source,yaml] | ||
---------------------------------------------------------------------- | ||
- module: postgresql | ||
hosts: ["postgres://localhost"] | ||
---------------------------------------------------------------------- | ||
|
||
Or more complex like: | ||
|
||
[source,yaml] | ||
---------------------------------------------------------------------- | ||
- module: postgresql | ||
hosts: ["postgres://localhost:40001?sslmode=disable", "postgres://otherhost:40001"] | ||
---------------------------------------------------------------------- | ||
|
||
WARNING: In case you use username and password in the hosts array, this | ||
information will be sent with each event as part of the `metricset.host` field. | ||
To prevent sending username and password the config options `username` and | ||
`password` can be used. | ||
|
||
[source,yaml] | ||
---- | ||
- module: postgresql | ||
metricsets: ["status"] | ||
hosts: ["postgres://localhost:5432"] | ||
username: root | ||
password: test | ||
---- | ||
|
||
[float] | ||
=== Compatibility | ||
|
||
This module was tested with PostgreSQL 9.5.3 and is expected to work with all | ||
versions >= 9. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.