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

chore(release): merge release 22.04.1 into 22.04.x #349

Merged
merged 31 commits into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
95e58a2
enh(broker/mysql_connection): unix socket is different on Debian or o…
bouda1 Jun 13, 2022
ea327d5
Mon 13562 sonar atoi 22.04.x.new (#290)
denliA Jun 21, 2022
a81829a
enh(ccc): new grpc client
bouda1 Jun 21, 2022
3af3790
fix(engine): when display_name is empty, it should be replaced by des…
bouda1 Jun 21, 2022
a23c890
enh(tests): database credentials configurable from resource.robot (#2…
denliA Jun 21, 2022
665dd9c
fix(engine): checkable::name() conflicted with host::name()
bouda1 Jun 21, 2022
1a4c987
Mon 13901 cbd multiargs 22.04.x (#293)
denliA Jun 23, 2022
5bc8326
Mon 13562 sonar unsigned bitwise operator (#294) (#295)
denliA Jun 24, 2022
9590659
enh(sonar): ignore postgresql in bam folder (#296) (#298)
denliA Jun 27, 2022
03643e6
enh(sonar): change reserved name to a non reserved one (#297) (#301)
denliA Jun 29, 2022
18e68a5
fix(broker/bam): downtimes on kpi can be more than one
bouda1 Jun 30, 2022
161271d
fix(broker): rebuild/remove graphs has come back
bouda1 Jul 5, 2022
f6b067e
enh(ccc): ccc is functional
bouda1 Jul 8, 2022
512bca7
MON-14166 fix bbdo compression nego (#316)
jean-christophe81 Jul 8, 2022
9dbe605
Mon 13562 sonar atoi external command (#302) (#318)
denliA Jul 12, 2022
027dbf6
fix(broker/engine): grpc api can be changed throught configuration. O…
bouda1 Jul 12, 2022
fc26741
fix(broker/bam): detection of downtime end was bad (#319)
bouda1 Jul 12, 2022
edf12a5
fix(engine): bad rebase fixed here
bouda1 Jul 12, 2022
d90a049
enh(sonar) : replace new by make_shared or make_unique (#322) (#326)
denliA Jul 18, 2022
8a0651e
fix(robot): fix robot BEATOI tests 22.04 (#325)
denliA Jul 18, 2022
e14ed0b
Mon 14198 sonar dynamic allocations (#327) (#328)
denliA Jul 25, 2022
65487df
fix(broker/rebuild): error in sql query
bouda1 Jul 28, 2022
1223736
fix(broker/rebuild): creation date of rrd file too late
bouda1 Jul 28, 2022
5316762
fix(ci): update dockerfile centos7 for python38 (#337)
rem31 Jul 29, 2022
dbf0b7d
fix(ci/debian): set shell to centreon-engine user (#334)
lgcosta Jul 29, 2022
0abe027
fix(ci): issue with conan fixed
bouda1 Jul 29, 2022
8269b22
fix(ci/scripts): conan bad path
bouda1 Aug 1, 2022
7e68f4e
enh(engine/anomalydetection): Enable recheck for anomaly-detection se…
jean-christophe81 Aug 3, 2022
cd461bc
fix(ci/tests): dateutil missing for robot
bouda1 Aug 3, 2022
7262cbc
fix(ci): correct syntax
chgautier Aug 30, 2022
ea82d0b
Merge branch '22.04.x' into release-22.04.1
chgautier Aug 30, 2022
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
Prev Previous commit
Next Next commit
enh(engine/anomalydetection): Enable recheck for anomaly-detection se…
…rvices

REFS: MON-14158
  • Loading branch information
jean-christophe81 authored Aug 3, 2022
commit 7e68f4e4f37f006471bd12cc21dcbb45bfb0daf3
4 changes: 2 additions & 2 deletions bbdo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ add_library(
"storage/status.hh"
)
set_target_properties(bbdo_storage PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_precompile_headers(bbdo_storage PRIVATE precomp_inc/precomp.hpp)
target_precompile_headers(bbdo_storage REUSE_FROM bbdo_bbdo)
add_dependencies(bbdo_storage table_max_size)
add_library(
bbdo_bam STATIC
Expand Down Expand Up @@ -157,5 +157,5 @@ add_library(
"bam/kpi_event.hh"
)
set_target_properties(bbdo_bam PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_precompile_headers(bbdo_bam PRIVATE precomp_inc/precomp.hpp)
target_precompile_headers(bbdo_bam REUSE_FROM bbdo_bbdo)
add_dependencies(bbdo_bam table_max_size)
131 changes: 69 additions & 62 deletions broker/neb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
##
## Copyright 2009-2013,2015 Centreon
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
## For more information : contact@centreon.com
##
# #
# # Copyright 2009-2013,2015 Centreon
# #
# # Licensed under the Apache License, Version 2.0 (the "License");
# # you may not use this file except in compliance with the License.
# # You may obtain a copy of the License at
# #
# # http://www.apache.org/licenses/LICENSE-2.0
# #
# # Unless required by applicable law or agreed to in writing, software
# # distributed under the License is distributed on an "AS IS" BASIS,
# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# # See the License for the specific language governing permissions and
# # limitations under the License.
# #
# # For more information : contact@centreon.com
# #

# Global options.
set(INC_DIR "${PROJECT_SOURCE_DIR}/neb/inc")
Expand All @@ -24,6 +24,7 @@ include_directories("${INC_DIR}")

# NEB sources.
set(NEB_SOURCES

# Sources.
# Headers.
${SRC_DIR}/acknowledgement.cc
Expand Down Expand Up @@ -100,20 +101,21 @@ set(NEB_SOURCES
add_library(nebbase STATIC ${NEB_SOURCES})
add_dependencies(nebbase table_max_size target_service target_host target_severity target_tag)
target_link_libraries(nebbase
CONAN_PKG::protobuf
pb_service_lib
pb_host_lib
pb_severity_lib
pb_tag_lib)
CONAN_PKG::protobuf
pb_service_lib
pb_host_lib
pb_severity_lib
pb_tag_lib)

set(NEBBASE_CXXFLAGS "${NEBBASE_CXXFLAGS} -fPIC")
set_property(TARGET nebbase PROPERTY COMPILE_FLAGS ${NEBBASE_CXXFLAGS})
target_precompile_headers(nebbase PRIVATE precomp_inc/nebbase_precomp.hpp)
target_precompile_headers(nebbase PRIVATE precomp_inc/precomp.hpp)

# Centreon Broker module.
set(NEB "10-neb")
set(NEB "${NEB}" PARENT_SCOPE)
add_library("${NEB}" SHARED

# Main source.
"${SRC_DIR}/broker.cc"
"${SRC_DIR}/node_id.cc"
Expand All @@ -126,16 +128,18 @@ add_library("${NEB}" SHARED

# Flags needed to include all symbols in binary.
target_link_libraries(${NEB} nebbase CONAN_PKG::spdlog)
# "-Wl,--whole-archive" nebbase "-Wl,--no-whole-archive")

# "-Wl,--whole-archive" nebbase "-Wl,--no-whole-archive")
set_target_properties("${NEB}" PROPERTIES PREFIX "")
target_precompile_headers(${NEB} PRIVATE precomp_inc/neb_precomp.hpp)
target_precompile_headers(${NEB} REUSE_FROM nebbase)
install(TARGETS "${NEB}"
LIBRARY DESTINATION "${PREFIX_MODULES}"
)

# Centreon Engine/Nagios module.
set(CBMOD "cbmod")
add_library("${CBMOD}" SHARED

# Sources.
"${PROJECT_SOURCE_DIR}/core/src/config/applier/init.cc"
"${SRC_DIR}/callback.cc"
Expand All @@ -144,6 +148,7 @@ add_library("${CBMOD}" SHARED
"${SRC_DIR}/internal.cc"
"${SRC_DIR}/neb.cc"
"${SRC_DIR}/set_log_data.cc"

# Headers.
"${INC_DIR}/com/centreon/broker/neb/callback.hh"
"${INC_DIR}/com/centreon/broker/neb/callbacks.hh"
Expand All @@ -157,52 +162,54 @@ get_property(CBMOD_DEFINES
list(APPEND CBMOD_DEFINES CBMOD)
set_property(TARGET "${CBMOD}"
PROPERTY COMPILE_DEFINITIONS "${CBMOD_DEFINES}")
if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# Flags needed to include all symbols in shared library.
target_link_libraries("${CBMOD}"
"-Wl,--whole-archive" "rokerbase" "-Wl,--no-whole-archive" CONAN_PKG::nlohmann_json CONAN_PKG::spdlog CONAN_PKG::asio)
else ()
else()
target_link_libraries("${CBMOD}" "rokerbase" CONAN_PKG::nlohmann_json CONAN_PKG::spdlog CONAN_PKG::asio)
endif ()
set_target_properties("${CBMOD}" PROPERTIES PREFIX "")
target_precompile_headers(${CBMOD} PRIVATE precomp_inc/precomp.hpp)
endif()

set_target_properties("${CBMOD}" PROPERTIES PREFIX "")
target_precompile_headers(${CBMOD} REUSE_FROM nebbase)

# Testing.
if (WITH_TESTING)
if(WITH_TESTING)
set(
TESTS_SOURCES
${TESTS_SOURCES}
${SRC_DIR}/set_log_data.cc
#Actual tests
${TEST_DIR}/custom_variable.cc
${TEST_DIR}/custom_variable_status.cc
${TEST_DIR}/event_handler.cc
${TEST_DIR}/flapping_status.cc
${TEST_DIR}/host.cc
${TEST_DIR}/host_check.cc
${TEST_DIR}/host_dependency.cc
${TEST_DIR}/host_parent.cc
${TEST_DIR}/host_status.cc
${TEST_DIR}/instance.cc
${TEST_DIR}/instance_status.cc
${TEST_DIR}/log_entry.cc
${TEST_DIR}/module.cc
${TEST_DIR}/randomize.cc
${TEST_DIR}/randomize.hh
${TEST_DIR}/service.cc
${TEST_DIR}/service_check.cc
${TEST_DIR}/service_dependency.cc
${TEST_DIR}/service_status.cc
${TEST_DIR}/set_log_data.cc
PARENT_SCOPE
)
TESTS_SOURCES
${TESTS_SOURCES}
${SRC_DIR}/set_log_data.cc

# Actual tests
${TEST_DIR}/custom_variable.cc
${TEST_DIR}/custom_variable_status.cc
${TEST_DIR}/event_handler.cc
${TEST_DIR}/flapping_status.cc
${TEST_DIR}/host.cc
${TEST_DIR}/host_check.cc
${TEST_DIR}/host_dependency.cc
${TEST_DIR}/host_parent.cc
${TEST_DIR}/host_status.cc
${TEST_DIR}/instance.cc
${TEST_DIR}/instance_status.cc
${TEST_DIR}/log_entry.cc
${TEST_DIR}/module.cc
${TEST_DIR}/randomize.cc
${TEST_DIR}/randomize.hh
${TEST_DIR}/service.cc
${TEST_DIR}/service_check.cc
${TEST_DIR}/service_dependency.cc
${TEST_DIR}/service_status.cc
${TEST_DIR}/set_log_data.cc
PARENT_SCOPE
)
set(
TESTS_LIBRARIES
${TESTS_LIBRARIES}
${NEB}
PARENT_SCOPE
)
TESTS_LIBRARIES
${TESTS_LIBRARIES}
${NEB}
PARENT_SCOPE
)
endif()

# Install rules.
Expand Down
1 change: 1 addition & 0 deletions broker/neb/precomp_inc/precomp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include <absl/strings/string_view.h>

#include <boost/circular_buffer.hpp>
#include <boost/container/flat_map.hpp>
#include <boost/optional.hpp>

#include <asio.hpp>
Expand Down
5 changes: 5 additions & 0 deletions clib/inc/com/centreon/timestamp.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <cstdint>
#include <ctime>
#include <ostream>
#include "com/centreon/namespace.hh"

CC_BEGIN()
Expand All @@ -39,6 +40,8 @@ class timestamp {
public:
timestamp(time_t secs = 0, int32_t usecs = 0);
timestamp(const timestamp& right);
timestamp(const struct timeval& right)
: _secs(right.tv_sec), _usecs(right.tv_usec) {}
~timestamp() noexcept = default;
timestamp& operator=(const timestamp& right);
bool operator==(const timestamp& right) const noexcept;
Expand Down Expand Up @@ -66,6 +69,8 @@ class timestamp {
int64_t to_useconds() const noexcept;
};

std::ostream& operator<<(std::ostream& s, const timestamp& to_dump);

CC_END()

#endif // !CC_TIMESTAMP_HH
15 changes: 15 additions & 0 deletions clib/src/timestamp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -319,3 +319,18 @@ time_t timestamp::to_seconds() const noexcept {
int64_t timestamp::to_useconds() const noexcept {
return _secs * 1000000ll + _usecs;
}

CC_BEGIN()

std::ostream& operator<<(std::ostream& s, const timestamp& to_dump) {
struct tm tmp;
time_t seconds = to_dump.to_seconds();
localtime_r(&seconds, &tmp);
char buf[80];
strftime(buf, sizeof(buf), "%c: ", &tmp);
s << buf;

return s;
}

CC_END()
Loading