diff --git a/plugins/inputs/postgresql_extensible/README.md b/plugins/inputs/postgresql_extensible/README.md index d79b1bbd3..9cc89ca48 100644 --- a/plugins/inputs/postgresql_extensible/README.md +++ b/plugins/inputs/postgresql_extensible/README.md @@ -59,6 +59,9 @@ to use them. # The script option can be used to specify the .sql file path. # If script and sqlquery options specified at same time, sqlquery will be used # + # the measurement field defines measurement name for metrics produced + # by the query. Default is "postgresql". + # # the tagvalue field is used to define custom tags (separated by comas). # the query is expected to return columns which match the names of the # defined tags. The values in these columns must be of a string-type, @@ -81,6 +84,7 @@ to use them. # # Structure : # [[inputs.postgresql_extensible.query]] + # measurement string # sqlquery string # min_version int # max_version int @@ -88,6 +92,7 @@ to use them. # tagvalue string (coma separated) # timestamp string [[inputs.postgresql_extensible.query]] + measurement="pg_stat_database" sqlquery="SELECT * FROM pg_stat_database where datname" min_version=901 tagvalue="" diff --git a/plugins/inputs/postgresql_extensible/sample.conf b/plugins/inputs/postgresql_extensible/sample.conf index e7d86b57f..beca92470 100644 --- a/plugins/inputs/postgresql_extensible/sample.conf +++ b/plugins/inputs/postgresql_extensible/sample.conf @@ -26,6 +26,9 @@ # The script option can be used to specify the .sql file path. # If script and sqlquery options specified at same time, sqlquery will be used # + # the measurement field defines measurement name for metrics produced + # by the query. Default is "postgresql". + # # the tagvalue field is used to define custom tags (separated by comas). # the query is expected to return columns which match the names of the # defined tags. The values in these columns must be of a string-type, @@ -48,6 +51,7 @@ # # Structure : # [[inputs.postgresql_extensible.query]] + # measurement string # sqlquery string # min_version int # max_version int @@ -55,6 +59,7 @@ # tagvalue string (coma separated) # timestamp string [[inputs.postgresql_extensible.query]] + measurement="pg_stat_database" sqlquery="SELECT * FROM pg_stat_database where datname" min_version=901 tagvalue=""