summaryrefslogtreecommitdiffstats
path: root/web/api/queries/weights.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-12 07:26:11 +0000
commit3c315f0fff93aa072472abc10815963ac0035268 (patch)
treea95f6a96e0e7bd139c010f8dc60b40e5b3062a99 /web/api/queries/weights.h
parentAdding upstream version 1.35.1. (diff)
downloadnetdata-3c315f0fff93aa072472abc10815963ac0035268.tar.xz
netdata-3c315f0fff93aa072472abc10815963ac0035268.zip
Adding upstream version 1.36.0.upstream/1.36.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/api/queries/weights.h')
-rw-r--r--web/api/queries/weights.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/web/api/queries/weights.h b/web/api/queries/weights.h
new file mode 100644
index 00000000..f88a134f
--- /dev/null
+++ b/web/api/queries/weights.h
@@ -0,0 +1,33 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#ifndef NETDATA_API_WEIGHTS_H
+#define NETDATA_API_WEIGHTS_H 1
+
+#include "query.h"
+
+typedef enum {
+ WEIGHTS_METHOD_MC_KS2 = 1,
+ WEIGHTS_METHOD_MC_VOLUME = 2,
+ WEIGHTS_METHOD_ANOMALY_RATE = 3,
+} WEIGHTS_METHOD;
+
+typedef enum {
+ WEIGHTS_FORMAT_CHARTS = 1,
+ WEIGHTS_FORMAT_CONTEXTS = 2,
+} WEIGHTS_FORMAT;
+
+extern int enable_metric_correlations;
+extern int metric_correlations_version;
+extern WEIGHTS_METHOD default_metric_correlations_method;
+
+extern int web_api_v1_weights (RRDHOST *host, BUFFER *wb, WEIGHTS_METHOD method, WEIGHTS_FORMAT format,
+ RRDR_GROUPING group, const char *group_options,
+ long long baseline_after, long long baseline_before,
+ long long after, long long before,
+ long long points, RRDR_OPTIONS options, SIMPLE_PATTERN *contexts, int tier, int timeout);
+
+extern WEIGHTS_METHOD weights_string_to_method(const char *method);
+extern const char *weights_method_to_string(WEIGHTS_METHOD method);
+extern int mc_unittest(void);
+
+#endif //NETDATA_API_WEIGHTS_H