From ea4c5e73f1ca6812bf89dc50c1db2767930f23e3 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Wed, 20 Aug 2014 22:10:05 -0700 Subject: [PATCH] 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. --- src/plugins/backend/collectd/unixsock.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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)) { -- 2.30.2