author | Sebastian Harl <sh@tokkee.org> | |
Fri, 18 Jul 2008 19:37:23 +0000 (21:37 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 24 Jul 2008 12:18:04 +0000 (14:18 +0200) | ||
commit | 12d48e6b453a4f028d4550d8cea159c913534c5d | |
tree | 2e4d32796295fd8fb8debb8c69bafb62b0c90d79 | tree | snapshot |
parent | 122cdaec2cc7d235d58a5e3e97aa6a4bbfa2d37c | commit | diff |
postgresql plugin: Added support for custom queries.
The user may now define and use custom queries to collect data. A query is
defined by specifying the SQL query to execute and a definition of the data
type of each result column:
<Query magic>
Query "SELECT magic FROM wizard;"
Column gauge magic
</Query>
The "Column" configuration option specifies the type name and optional type
instance: Column <type> [<type_instance>]. The number and order of the
"Column" option has to match the columns of the query result.
A query is activated by adding the configuration option "Query <name>" to the
appropriate "<Database>" configuration blocks. A query may be used multiple
times.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
The user may now define and use custom queries to collect data. A query is
defined by specifying the SQL query to execute and a definition of the data
type of each result column:
<Query magic>
Query "SELECT magic FROM wizard;"
Column gauge magic
</Query>
The "Column" configuration option specifies the type name and optional type
instance: Column <type> [<type_instance>]. The number and order of the
"Column" option has to match the columns of the query result.
A query is activated by adding the configuration option "Query <name>" to the
appropriate "<Database>" configuration blocks. A query may be used multiple
times.
Signed-off-by: Sebastian Harl <sh@tokkee.org>
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/postgresql.c | diff | blob | history |