ml.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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_get_info(RRDHOST *RH, BUFFER *wb);
  19. void ml_host_get_detection_info(RRDHOST *RH, BUFFER *wb);
  20. void ml_host_get_models(RRDHOST *RH, BUFFER *wb);
  21. void ml_chart_new(RRDSET *rs);
  22. void ml_chart_delete(RRDSET *rs);
  23. bool ml_chart_update_begin(RRDSET *rs);
  24. void ml_chart_update_end(RRDSET *rs);
  25. void ml_dimension_new(RRDDIM *rd);
  26. void ml_dimension_delete(RRDDIM *rd);
  27. bool ml_dimension_is_anomalous(RRDDIM *rd, time_t curr_time, double value, bool exists);
  28. int ml_dimension_load_models(RRDDIM *rd);
  29. void ml_update_global_statistics_charts(uint64_t models_consulted);
  30. #ifdef __cplusplus
  31. };
  32. #endif
  33. #endif /* NETDATA_ML_H */