summaryrefslogtreecommitdiffstats
path: root/ml/ml.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 18:12:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 18:12:10 +0000
commitb5321aff06d6ea8d730d62aec2ffd8e9271c1ffc (patch)
tree36c41e35994786456154f9d3bf88c324763aeea4 /ml/ml.h
parentAdding upstream version 1.33.1. (diff)
downloadnetdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.tar.xz
netdata-b5321aff06d6ea8d730d62aec2ffd8e9271c1ffc.zip
Adding upstream version 1.34.0.upstream/1.34.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/ml.h')
-rw-r--r--ml/ml.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/ml/ml.h b/ml/ml.h
index 783bfabb9..4b33b2236 100644
--- a/ml/ml.h
+++ b/ml/ml.h
@@ -8,10 +8,19 @@ extern "C" {
#endif
#include "daemon/common.h"
+#include "web/api/queries/rrdr.h"
+
+// This is an internal DBEngine function redeclared here so that we can free
+// the anomaly rate dimension, whenever its backing dimension is freed.
+extern void rrddim_free_custom(RRDSET *st, RRDDIM *rd, int db_rotated);
typedef void* ml_host_t;
typedef void* ml_dimension_t;
+bool ml_capable();
+
+bool ml_enabled(RRDHOST *RH);
+
void ml_init(void);
void ml_new_host(RRDHOST *RH);
@@ -31,6 +40,14 @@ char *ml_get_anomaly_events(RRDHOST *RH, const char *AnomalyDetectorName,
char *ml_get_anomaly_event_info(RRDHOST *RH, const char *AnomalyDetectorName,
int AnomalyDetectorVersion, time_t After, time_t Before);
+void ml_process_rrdr(RRDR *R, int MaxAnomalyRates);
+
+void ml_dimension_update_name(RRDSET *RS, RRDDIM *RD, const char *name);
+
+bool ml_streaming_enabled();
+
+#define ML_ANOMALY_RATES_CHART_ID "anomaly_detection.anomaly_rates"
+
#if defined(ENABLE_ML_TESTS)
int test_ml(int argc, char *argv[]);
#endif