From 0d27e58e7822a31816c898a005d820f5d976d4a2 Mon Sep 17 00:00:00 2001 From: Thomas Menard Date: Mon, 7 Mar 2016 11:35:08 +0100 Subject: [PATCH] Update README and SampleConfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added more explanation on the plugin and change the « withdbname » boolean to false to be sure that by default it will work if the database is not set --- plugins/inputs/postgresql_extensible/README.md | 4 ++-- plugins/inputs/postgresql_extensible/postgresql_extensible.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/inputs/postgresql_extensible/README.md b/plugins/inputs/postgresql_extensible/README.md index bc5a549c9..1c63afe68 100644 --- a/plugins/inputs/postgresql_extensible/README.md +++ b/plugins/inputs/postgresql_extensible/README.md @@ -30,6 +30,8 @@ For now only two queries are specified and it's up to you to add more; some per # New queries can be added, if the withdbname is set to true and there is no databases defined # in the 'databases field', the sql query is ended by a 'is not null' in order to make the query # succeed. + # Be careful that the sqlquery must contain the where clause with a part of the filtering, the plugin will + # add a 'IN (dbname list)' clause if the withdbname is set to true # the tagvalue field is used to define custom tags (separated by comas) # # Structure : @@ -51,5 +53,3 @@ For now only two queries are specified and it's up to you to add more; some per The system can be easily extended using homemade metrics collection tools or using postgreql extensions (pg_stat_statement, pg_proctab, powa...) - - diff --git a/plugins/inputs/postgresql_extensible/postgresql_extensible.go b/plugins/inputs/postgresql_extensible/postgresql_extensible.go index bf060506d..22c504a50 100644 --- a/plugins/inputs/postgresql_extensible/postgresql_extensible.go +++ b/plugins/inputs/postgresql_extensible/postgresql_extensible.go @@ -67,7 +67,7 @@ var sampleConfig = ` [[inputs.postgresql_extensible.query]] sqlquery="SELECT * FROM pg_stat_database where datname" version=901 - withdbname=true + withdbname=false tagvalue="" [[inputs.postgresql_extensible.query]] sqlquery="SELECT * FROM pg_stat_bgwriter"