index e432cab428130252e517b72b0855fc210468c5c7..5e8a2a77be0a6257eda63f2196c250027612b491 100644 (file)
--- a/src/include/core/store.h
+++ b/src/include/core/store.h
#include "core/object.h"
#include "core/data.h"
#include "core/time.h"
+#include "core/timeseries.h"
#include "parser/ast.h"
#include "utils/strbuf.h"
SDB_METRIC,
SDB_ATTRIBUTE = 1 << 4,
+ SDB_TIMESERIES = 1 << 6,
/*
* Queryable fields of a stored object.
: ((t) == (SDB_ATTRIBUTE | SDB_HOST)) ? "host attribute" \
: ((t) == (SDB_ATTRIBUTE | SDB_SERVICE)) ? "service attribute" \
: ((t) == (SDB_ATTRIBUTE | SDB_METRIC)) ? "metric attribute" \
+ : ((t) == SDB_TIMESERIES) ? "timeseries" \
: "unknown")
#define SDB_FIELD_TO_NAME(f) \
typedef struct {
const char *type;
const char *id;
+ const sdb_timeseries_info_t *info;
sdb_time_t last_update;
} sdb_metric_store_t;
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, 0, NULL, 0 }
+#define SDB_STORE_METRIC_INIT { NULL, NULL, NULL, 0, 0, 0, NULL, 0 }
/*
* sdb_store_attribute_t represents a stored attribute.