diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-01-26 18:05:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-01-26 18:05:42 +0000 |
commit | 112b5b91647c3dea45cc1c9bc364df526c8012f1 (patch) | |
tree | 450af925135ec664c4310a1eb28b69481094ee2a /ml/ml.cc | |
parent | Releasing debian version 1.32.1-2. (diff) | |
download | netdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.tar.xz netdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.zip |
Merging upstream version 1.33.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | ml/ml.cc | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -75,7 +75,6 @@ char *ml_get_host_info(RRDHOST *RH) { if (RH && RH->ml_host) { Host *H = static_cast<Host *>(RH->ml_host); H->getConfigAsJson(ConfigJson); - H->getDetectionInfoAsJson(ConfigJson); } else { ConfigJson["enabled"] = false; } @@ -83,6 +82,19 @@ char *ml_get_host_info(RRDHOST *RH) { return strdup(ConfigJson.dump(2, '\t').c_str()); } +char *ml_get_host_runtime_info(RRDHOST *RH) { + nlohmann::json ConfigJson; + + if (RH && RH->ml_host) { + Host *H = static_cast<Host *>(RH->ml_host); + H->getDetectionInfoAsJson(ConfigJson); + } else { + return nullptr; + } + + return strdup(ConfigJson.dump(1, '\t').c_str()); +} + bool ml_is_anomalous(RRDDIM *RD, double Value, bool Exists) { Dimension *D = static_cast<Dimension *>(RD->state->ml_dimension); if (!D) |