ml.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. bool ml_capable();
  10. bool ml_enabled(RRDHOST *rh);
  11. bool ml_streaming_enabled();
  12. void ml_init(void);
  13. void ml_fini(void);
  14. void ml_start_threads(void);
  15. void ml_stop_threads(void);
  16. void ml_host_new(RRDHOST *rh);
  17. void ml_host_delete(RRDHOST *rh);
  18. void ml_host_start(RRDHOST *RH);
  19. void ml_host_stop(RRDHOST *RH);
  20. void ml_host_get_info(RRDHOST *RH, BUFFER *wb);
  21. void ml_host_get_detection_info(RRDHOST *RH, BUFFER *wb);
  22. void ml_host_get_models(RRDHOST *RH, BUFFER *wb);
  23. void ml_chart_new(RRDSET *rs);
  24. void ml_chart_delete(RRDSET *rs);
  25. bool ml_chart_update_begin(RRDSET *rs);
  26. void ml_chart_update_end(RRDSET *rs);
  27. void ml_dimension_new(RRDDIM *rd);
  28. void ml_dimension_delete(RRDDIM *rd);
  29. bool ml_dimension_is_anomalous(RRDDIM *rd, time_t curr_time, double value, bool exists);
  30. int ml_dimension_load_models(RRDDIM *rd);
  31. void ml_update_global_statistics_charts(uint64_t models_consulted);
  32. bool ml_host_get_host_status(RRDHOST *rh, struct ml_metrics_statistics *mlm);
  33. bool ml_host_running(RRDHOST *rh);
  34. #ifdef __cplusplus
  35. };
  36. #endif
  37. #endif /* NETDATA_ML_H */