diff --git a/plugins/postgresql/postgresql.go b/plugins/postgresql/postgresql.go index a7a8d1acd..007ac20bf 100644 --- a/plugins/postgresql/postgresql.go +++ b/plugins/postgresql/postgresql.go @@ -26,13 +26,17 @@ var sampleConfig = ` [[postgresql.servers]] # specify address via a url matching: - # postgres://[pqgotest[:password]]@localhost?sslmode=[disable|verify-ca|verify-full] + # postgres://[pqgotest[:password]]@localhost[/dbname]?sslmode=[disable|verify-ca|verify-full] # or a simple string: - # host=localhost user=pqotest password=... sslmode=... + # host=localhost user=pqotest password=... sslmode=... dbname=app_production # # All connection parameters are optional. By default, the host is localhost # and the user is the currently running user. For localhost, we default # to sslmode=disable as well. + # 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 = "sslmode=disable"