ml.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. #ifndef NETDATA_ML_H
  3. #define NETDATA_ML_H
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. #include "daemon/common.h"
  8. #include "web/api/queries/rrdr.h"
  9. #include "database/sqlite/sqlite_db_migration.h"
  10. bool ml_capable();
  11. bool ml_enabled(RRDHOST *rh);
  12. bool ml_streaming_enabled();
  13. void ml_init(void);
  14. void ml_fini(void);
  15. void ml_start_threads(void);
  16. void ml_stop_threads(void);
  17. void ml_host_new(RRDHOST *rh);
  18. void ml_host_delete(RRDHOST *rh);
  19. void ml_host_start(RRDHOST *RH);
  20. void ml_host_stop(RRDHOST *RH);
  21. void ml_host_get_info(RRDHOST *RH, BUFFER *wb);
  22. void ml_host_get_detection_info(RRDHOST *RH, BUFFER *wb);
  23. void ml_host_get_models(RRDHOST *RH, BUFFER *wb);
  24. void ml_chart_new(RRDSET *rs);
  25. void ml_chart_delete(RRDSET *rs);
  26. bool ml_chart_update_begin(RRDSET *rs);
  27. void ml_chart_update_end(RRDSET *rs);
  28. void ml_dimension_new(RRDDIM *rd);
  29. void ml_dimension_delete(RRDDIM *rd);
  30. bool ml_dimension_is_anomalous(RRDDIM *rd, time_t curr_time, double value, bool exists);
  31. int ml_dimension_load_models(RRDDIM *rd);
  32. void ml_update_global_statistics_charts(uint64_t models_consulted);
  33. bool ml_host_get_host_status(RRDHOST *rh, struct ml_metrics_statistics *mlm);
  34. bool ml_host_running(RRDHOST *rh);
  35. #ifdef __cplusplus
  36. };
  37. #endif
  38. #endif /* NETDATA_ML_H */