Expand on tagvalue option in postgresql_extensible (#3720)
This commit is contained in:
parent
7a197a3b2e
commit
eca80961b8
|
@ -43,7 +43,11 @@ The example below has two queries are specified, with the following parameters:
|
|||
# withdbname was true.
|
||||
# Be careful that if the withdbname is set to false you don't have to define
|
||||
# the where clause (aka with the dbname)
|
||||
# the tagvalue field is used to define custom tags (separated by comas)
|
||||
#
|
||||
# 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,
|
||||
# a number-type or a blob-type.
|
||||
#
|
||||
# Structure :
|
||||
# [[inputs.postgresql_extensible.query]]
|
||||
|
@ -109,6 +113,15 @@ using postgreql extensions ([pg_stat_statements](http://www.postgresql.org/docs/
|
|||
version=901
|
||||
withdbname=false
|
||||
tagvalue="db"
|
||||
[[inputs.postgresql_extensible.query]]
|
||||
sqlquery="""
|
||||
SELECT type, (enabled || '') AS enabled, COUNT(*)
|
||||
FROM application_users
|
||||
GROUP BY type, enabled
|
||||
"""
|
||||
version=901
|
||||
withdbname=false
|
||||
tagvalue="type,enabled"
|
||||
```
|
||||
|
||||
# Postgresql Side
|
||||
|
|
Loading…
Reference in New Issue