Code

Let the JSON formatter include a metric's data_names.
[sysdb.git] / src / plugins / backend / collectd / unixsock.c
index 65b05845814ec6e66601cda58bc829a279956f37..73d0dc6228e8aff05c5c7b41195412a1cfc63ffa 100644 (file)
@@ -44,6 +44,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 
 SDB_PLUGIN_MAGIC;
 
@@ -150,7 +151,7 @@ add_metrics(const char *hostname, char *plugin, char *type,
 
        char metric_id[(ud->ts_base ? strlen(ud->ts_base) : 0)
                + strlen(hostname) + sizeof(name) + 7];
-       sdb_metric_store_t store = { ud->ts_type, metric_id };
+       sdb_metric_store_t store = { ud->ts_type, metric_id, NULL, last_update };
 
        sdb_data_t data = { SDB_TYPE_STRING, { .string = NULL } };