Update README and SampleConfig

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
This commit is contained in:
Thomas Menard 2016-03-07 11:35:08 +01:00
parent d43aeed4cc
commit 0d27e58e78
2 changed files with 3 additions and 3 deletions

View File

@ -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 # 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 # in the 'databases field', the sql query is ended by a 'is not null' in order to make the query
# succeed. # 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) # the tagvalue field is used to define custom tags (separated by comas)
# #
# Structure : # 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...) The system can be easily extended using homemade metrics collection tools or using postgreql extensions (pg_stat_statement, pg_proctab, powa...)

View File

@ -67,7 +67,7 @@ var sampleConfig = `
[[inputs.postgresql_extensible.query]] [[inputs.postgresql_extensible.query]]
sqlquery="SELECT * FROM pg_stat_database where datname" sqlquery="SELECT * FROM pg_stat_database where datname"
version=901 version=901
withdbname=true withdbname=false
tagvalue="" tagvalue=""
[[inputs.postgresql_extensible.query]] [[inputs.postgresql_extensible.query]]
sqlquery="SELECT * FROM pg_stat_bgwriter" sqlquery="SELECT * FROM pg_stat_bgwriter"