summaryrefslogtreecommitdiffstats
path: root/ml/ml.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 18:12:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-14 18:12:14 +0000
commitbb50acdcb8073654ea667b8c0272e335bd43f844 (patch)
tree1e00c8a29871426f8182658928dcb62e42d57ce8 /ml/ml.h
parentReleasing debian version 1.33.1-1. (diff)
downloadnetdata-bb50acdcb8073654ea667b8c0272e335bd43f844.tar.xz
netdata-bb50acdcb8073654ea667b8c0272e335bd43f844.zip
Merging upstream version 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 783bfabb..4b33b223 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