From: Sebastian Harl Date: Thu, 21 Aug 2014 05:10:05 +0000 (-0700) Subject: collectd::unixsock: Report an error if TimeseriesBackend != rrdtool. X-Git-Tag: sysdb-0.4.0~18 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ea4c5e73f1ca6812bf89dc50c1db2767930f23e3;p=sysdb.git collectd::unixsock: Report an error if TimeseriesBackend != rrdtool. No other backends are supported yet by the plugin. Support for other types will require different metric store ID generation. --- diff --git a/src/plugins/backend/collectd/unixsock.c b/src/plugins/backend/collectd/unixsock.c index b1db539..e7b6416 100644 --- a/src/plugins/backend/collectd/unixsock.c +++ b/src/plugins/backend/collectd/unixsock.c @@ -405,6 +405,17 @@ sdb_collectd_config_instance(oconfig_item_t *ci) } if (ud->ts_type) { + /* TODO: add support for other backend types + * -> will require different ID generation */ + if (strcasecmp(ud->ts_type, "rrdtool")) { + sdb_log(SDB_LOG_ERR, "collectd::unixsock backend: " + "TimeseriesBackend '%s' is not supported - " + "use 'rrdtool' instead.", ud->ts_type); + ud->ts_type = ud->ts_base = NULL; + user_data_destroy(ud); + return -1; + } + ud->ts_type = strdup(ud->ts_type); ud->ts_base = strdup(ud->ts_base); if ((! ud->ts_type) || (! ud->ts_base)) {