Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration docs to Postgresql input plugin #2515

Merged
merged 2 commits into from
Mar 9, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions plugins/inputs/postgresql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,28 @@ _* value ignored and therefore not recorded._


More information about the meaning of these metrics can be found in the [PostgreSQL Documentation](http://www.postgresql.org/docs/9.2/static/monitoring-stats.html#PG-STAT-DATABASE-VIEW)

## Configruation
Specify address via a url matching:

`postgres://[pqgotest[:password]]@localhost[/dbname]?sslmode=[disable|verify-ca|verify-full]`

All connection parameters are optional. Without the dbname parameter, the driver will default to a database with the same name as the user. This dbname is just for instantiating a connection with the server and doesn't restrict the databases we are trying
to grab metrics for.

`address = "host=localhost user=postgres sslmode=disable"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

though I've not included the configuration example that seems to use all he connections on the database[1]

I think you've included it here?


A list of databases to explicitly ignore. If not specified, metrics for all databases are gathered. Do NOT use with the 'databases' option.

`ignored_databases = ["postgres", "template0", "template1"]`

A list of databases to pull metrics about. If not specified, metrics for all databases are gathered. Do NOT use with the 'ignore_databases' option.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in ignored_databases


`databases = ["app_production", "testing"]`

### Configuration example
```
[[inputs.postgresql]]
address = "postgres://telegraf@localhost/someDB"
ignored_databases = ["template0", "template1"]
```