Code

Store a separate last_update timestamp for metric stores.
[sysdb.git] / src / plugins / backend / collectd / unixsock.c
index 65b05845814ec6e66601cda58bc829a279956f37..54df202fbecaa32aad705b32fe5b52440aa85dac 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, last_update };
 
        sdb_data_t data = { SDB_TYPE_STRING, { .string = NULL } };