summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0a125de)
raw | patch | inline | side by side (parent: 0a125de)
author | Sebastian Harl <sh@tokkee.org> | |
Thu, 18 Oct 2012 11:13:58 +0000 (13:13 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Thu, 18 Oct 2012 11:13:58 +0000 (13:13 +0200) |
src/collectd.conf.pod | patch | blob | history | |
src/postgresql.c | patch | blob | history |
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index 1a1339e6215e06d6a90bb8bab15d0441e9898a40..e24282c3bdb9310f31aa30c4adb9d54bfb457d43 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
The name of the database of the current connection.
+=item I<instance>
+
+The name of the database plugin instance. See the B<Instance> option of the
+database specification below for details.
+
=item I<username>
The username used to connect to the database.
diff --git a/src/postgresql.c b/src/postgresql.c
index 5f29becb2bba3d9893ac3c04de3c6cb8795daccf..675505bb3576919d741a3c31bb86fac5e6acce08 100644 (file)
--- a/src/postgresql.c
+++ b/src/postgresql.c
C_PSQL_PARAM_DB,
C_PSQL_PARAM_USER,
C_PSQL_PARAM_INTERVAL,
+ C_PSQL_PARAM_INSTANCE,
} c_psql_param_t;
/* Parameter configuration. Stored as `user data' in the query objects. */
? CDTIME_T_TO_DOUBLE (db->interval) : interval_g);
params[i] = interval;
break;
+ case C_PSQL_PARAM_INSTANCE:
+ params[i] = db->instance;
+ break;
default:
assert (0);
}
data->params[data->params_num] = C_PSQL_PARAM_USER;
else if (0 == strcasecmp (param_str, "interval"))
data->params[data->params_num] = C_PSQL_PARAM_INTERVAL;
+ else if (0 == strcasecmp (param_str, "instance"))
+ data->params[data->params_num] = C_PSQL_PARAM_INSTANCE;
else {
log_err ("Invalid parameter \"%s\".", param_str);
return 1;