[collectd] [PATCH 2/3] postgresql plugin: Check for and report MinPGVersion > MaxPGVersion.
Sebastian Harl
sh at tokkee.org
Tue Aug 26 16:15:37 CEST 2008
Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
src/postgresql.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/postgresql.c b/src/postgresql.c
index b1de07f..409a5de 100644
--- a/src/postgresql.c
+++ b/src/postgresql.c
@@ -774,6 +774,14 @@ static int c_psql_config_query (oconfig_item_t *ci)
log_warn ("Ignoring unknown config key \"%s\".", c->key);
}
+ if (query->min_pg_version > query->max_pg_version) {
+ log_err ("Query \"%s\": MinPGVersion > MaxPGVersion.",
+ query->name);
+ c_psql_query_delete (query);
+ --queries_num;
+ return 1;
+ }
+
if (NULL == query->query) {
log_err ("Query \"%s\" does not include an SQL query string - "
"please check your configuration.", query->name);
--
1.6.0.90.g436ed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080826/f1f7455e/attachment.pgp
More information about the collectd
mailing list