Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mon 35579 ad useless messages 23.04 #1163

Merged
merged 2 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 23 additions & 21 deletions engine/src/anomalydetection.cc
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
/*
** Copyright 2020-2021 Centreon
**
** This file is part of Centreon Engine.
**
** Centreon Engine is free software: you can redistribute it and/or
** modify it under the terms of the GNU General Public License version 2
** as published by the Free Software Foundation.
**
** Centreon Engine is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Centreon Engine. If not, see
** <http://www.gnu.org/licenses/>.
*/
/**
* Copyright 2020-2024 Centreon
*
* This file is part of Centreon Engine.
*
* Centreon Engine is free software: you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* Centreon Engine is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Centreon Engine. If not, see
* <http://www.gnu.org/licenses/>.
*/

#include "com/centreon/engine/anomalydetection.hh"

Expand Down Expand Up @@ -1120,9 +1120,11 @@ void anomalydetection::init_thresholds() {
try {
t.open(_thresholds_file);
} catch (const std::system_error& e) {
SPDLOG_LOGGER_ERROR(log_v2::config(),
"Fail to read thresholds file '{}' : {}",
_thresholds_file, e.code().message());
if (!verify_config) {
SPDLOG_LOGGER_ERROR(log_v2::config(),
"Fail to read thresholds file '{}' : {}",
_thresholds_file, e.code().message());
}
return;
} catch (const std::exception& e) {
SPDLOG_LOGGER_ERROR(log_v2::config(),
Expand Down
Loading
Loading