From 01fab30b11a2a530e49fcd4efadb53f145188a49 Mon Sep 17 00:00:00 2001 From: rem31 <73845199+rem31@users.noreply.github.com> Date: Tue, 25 Jan 2022 16:14:25 +0100 Subject: [PATCH] fix(rrd): change log level for log rrd rebuild REFS: MON-11960 --- centreon-broker/rrd/src/output.cc | 12 +++++------- centreon-tests/README.md | 7 ++++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/centreon-broker/rrd/src/output.cc b/centreon-broker/rrd/src/output.cc index aee04c58a2a..2f88dbe4720 100644 --- a/centreon-broker/rrd/src/output.cc +++ b/centreon-broker/rrd/src/output.cc @@ -174,8 +174,6 @@ void output::update() { template int output::write(std::shared_ptr const& d) { log_v2::rrd()->trace("RRD: output::write."); - if (d->type() == 0x30009) - log_v2::rrd()->warn("RRD: GOODGOODGOOD"); // Check that data exists. if (!validate(d, "RRD")) return 1; @@ -289,8 +287,8 @@ int output::write(std::shared_ptr const& d) { std::static_pointer_cast(d)}; switch (e->obj.state()) { case RebuildMessage_State_START: - log_v2::rrd()->debug("RRD: Starting to rebuild metrics ({})", - fmt::join(e->obj.metric_id(), ",")); + log_v2::rrd()->info("RRD: Starting to rebuild metrics ({})", + fmt::join(e->obj.metric_id(), ",")); // Rebuild is starting. for (auto& m : e->obj.metric_id()) { std::string path{fmt::format("{}{}.rrd", _metrics_path, m)}; @@ -305,8 +303,8 @@ int output::write(std::shared_ptr const& d) { _rebuild_data(e->obj); break; case RebuildMessage_State_END: - log_v2::rrd()->debug("RRD: Finishing to rebuild metrics ({})", - fmt::join(e->obj.metric_id(), ",")); + log_v2::rrd()->info("RRD: Finishing to rebuild metrics ({})", + fmt::join(e->obj.metric_id(), ",")); // Rebuild is ending. for (auto& m : e->obj.metric_id()) { std::string path{fmt::format("{}{}.rrd", _metrics_path, m)}; @@ -331,7 +329,7 @@ int output::write(std::shared_ptr const& d) { for (auto& m : e->obj.metric_ids()) { std::string path{fmt::format("{}{}.rrd", _metrics_path, m)}; /* File removed */ - log_v2::rrd()->info("RRD: removing {} file", path, m); + log_v2::rrd()->info("RRD: removing {} file", path); _backend.remove(path); } for (auto& i : e->obj.index_ids()) { diff --git a/centreon-tests/README.md b/centreon-tests/README.md index 41827454d9b..9847d40e849 100644 --- a/centreon-tests/README.md +++ b/centreon-tests/README.md @@ -12,12 +12,17 @@ From a Centreon host, you need to install Robot Framework ``` pip3 install -U robotframework robotframework-databaselibrary pymysql + +yum install "Development Tools" python3-devel -y + +pip3 install grpcio==1.33.2 grpcio_tools==1.33.2 + +./init-proto.sh ``` Then to run tests, you can use the following commands ``` -cd centreon-tests/robot robot . ```