Code

Let the JSON formatter include a metric's data_names.
[sysdb.git] / src / include / core / store.h
index 7a9a209b788d0f2d9c616ff3550e66eb09fb4f3d..f0fc0c7d779cf4504eb67f316c6846c8f7e99303 100644 (file)
@@ -32,6 +32,7 @@
 #include "core/object.h"
 #include "core/data.h"
 #include "core/time.h"
+#include "core/timeseries.h"
 #include "parser/ast.h"
 #include "utils/strbuf.h"
 
@@ -125,6 +126,8 @@ typedef struct {
 typedef struct {
        const char *type;
        const char *id;
+       const sdb_timeseries_info_t *info;
+       sdb_time_t last_update;
 } sdb_metric_store_t;
 
 /*
@@ -133,14 +136,17 @@ typedef struct {
 typedef struct {
        const char *hostname;
        const char *name;
-       sdb_metric_store_t store;
+
+       /* All data stores providing this metric. */
+       const sdb_metric_store_t *stores;
+       size_t stores_num;
 
        sdb_time_t last_update;
        sdb_time_t interval;
        const char * const *backends;
        size_t backends_num;
 } sdb_store_metric_t;
-#define SDB_STORE_METRIC_INIT { NULL, NULL, { NULL, NULL }, 0, 0, NULL, 0 }
+#define SDB_STORE_METRIC_INIT { NULL, NULL, NULL, 0, 0, 0, NULL, 0 }
 
 /*
  * sdb_store_attribute_t represents a stored attribute.