diff --git a/.github/workflows/package-collect.yml b/.github/workflows/package-collect.yml index 5790ea7ff0c..494d4de8c21 100644 --- a/.github/workflows/package-collect.yml +++ b/.github/workflows/package-collect.yml @@ -105,7 +105,7 @@ jobs: if: ${{ matrix.package_extension == 'rpm' }} run: | cd selinux - for MODULE in "centreon-engine" "centreon-broker"; do + for MODULE in "centreon-engine" "centreon-broker" "centreon-agent"; do cd $MODULE sed -i "s/@VERSION@/${{ inputs.version }}/g" $MODULE.te make -f /usr/share/selinux/devel/Makefile diff --git a/.gitignore b/.gitignore index 8243275dd6e..77cd000405a 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,10 @@ log.html output.xml report.html +# agent +agent/scripts/centagent.service +opentelemetry-proto + # bbdo bbdo/*_accessor.hh @@ -140,3 +144,4 @@ tests/bench.unqlite tests/resources/*_pb2.py tests/resources/*_pb2_grpc.py tests/resources/grpc_stream.proto +tests/resources/opentelemetry diff --git a/CMakeLists.txt b/CMakeLists.txt index e7b978be4c3..499977696df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -146,6 +146,8 @@ endif() # ########### CONSTANTS ########### set(USER_BROKER centreon-broker) set(USER_ENGINE centreon-engine) +set(USER_AGENT centreon-agent) + find_package(fmt CONFIG REQUIRED) find_package(spdlog CONFIG REQUIRED) diff --git a/agent/CMakeLists.txt b/agent/CMakeLists.txt index 79bb5ffb47b..6f5b93e5aaa 100644 --- a/agent/CMakeLists.txt +++ b/agent/CMakeLists.txt @@ -22,6 +22,7 @@ project("Centreon agent" C CXX) # Set directories. set(INCLUDE_DIR "${PROJECT_SOURCE_DIR}/inc/com/centreon/agent") set(SRC_DIR "${PROJECT_SOURCE_DIR}/src") +set(SCRIPT_DIR "${PROJECT_SOURCE_DIR}/scripts") add_definitions("-D_GLIBCXX_USE_CXX11_ABI=1") @@ -130,8 +131,6 @@ target_link_libraries( ${CENTREON_AGENT} PRIVATE -L${PROTOBUF_LIB_DIR} gRPC::gpr gRPC::grpc gRPC::grpc++ gRPC::grpc++_alts -# cerpc -# berpc centagent_lib centreon_common centreon_grpc @@ -157,7 +156,28 @@ if(WITH_TESTING) add_subdirectory(test) endif() -#if(WITH_CONF) -# add_subdirectory(conf) -#endif() +set(PREFIX_AGENT_CONF "${CMAKE_INSTALL_FULL_SYSCONFDIR}/centreon-agent") + + +if(WITH_CONF) + add_subdirectory(conf) +endif() + +# Generate Systemd script. +message(STATUS "Generating systemd startup script.") +configure_file("${SCRIPT_DIR}/centagent.service.in" + "${SCRIPT_DIR}/centagent.service") + +# Startup dir. +if(WITH_STARTUP_DIR) + set(STARTUP_DIR "${WITH_STARTUP_DIR}") +else() + set(STARTUP_DIR "/etc/systemd/system") +endif() + +# Script install rule. +install( + PROGRAMS "${SCRIPT_DIR}/centagent.service" + DESTINATION "${STARTUP_DIR}" + COMPONENT "runtime") diff --git a/agent/conf/CMakeLists.txt b/agent/conf/CMakeLists.txt new file mode 100644 index 00000000000..8387e7c2956 --- /dev/null +++ b/agent/conf/CMakeLists.txt @@ -0,0 +1,43 @@ +# +# Copyright 2024 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 +# + +# Set directories. +set(SRC_DIR "${PROJECT_SOURCE_DIR}/conf") + +# Configure files. +configure_file("${SRC_DIR}/centagent.cfg.in" + "${SRC_DIR}/centagent.cfg") + +# Install files if necessary. +option(WITH_SAMPLE_CONFIG "Install sample configuration files." ON) +if (WITH_SAMPLE_CONFIG) + install(DIRECTORY "${SRC_DIR}/" + DESTINATION "${PREFIX_AGENT_CONF}" + COMPONENT "runtime" + FILES_MATCHING PATTERN "*.cfg") + + install(CODE " + function(my_chown user group file) + if (APPLE OR (UNIX AND NOT CYGWIN)) + execute_process(COMMAND \"chown\" \"\${user}:\${group}\" \"\${file}\") + endif () + endfunction() + + my_chown(\"${USER_AGENT}\" \"${USER_AGENT}\" \"${PREFIX_AGENT_CONF}/centagent.cfg\") + ") +endif () diff --git a/agent/conf/centagent.cfg.in b/agent/conf/centagent.cfg.in new file mode 100644 index 00000000000..58b1578db8d --- /dev/null +++ b/agent/conf/centagent.cfg.in @@ -0,0 +1,137 @@ +## +## Copyright 2024 Centreon +## +## This file is part of Centreon Agent. +## +## 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 +## + +# file: centagent.cfg +# brief: Sample main config file for Centreon Agent @VERSION@ +# +# Read the documentation for more information on this configuration file. I've +# provided some comments here, but things may not be so clear without further +# explanation. +# If you want to have a list of all options, +# in a terminal, executes @CMAKE_INSTALL_FULL_BINDIR@/@CENTREON_AGENT@ --help + + +# var: log_file +# brief: This is the main log file where service and host events are logged for +# historical purposes. This should be the first option specified in the +# config file! + +log_file=@AGENT_VAR_LOG_DIR@/@CENTREON_AGENT@.log + + +# var: log_level +# brief: You can choose log verbosity: +# critical, error, info, debug, trace +# You can change log verbosity during runtime with USR1 and USR2 signals +# Ex: kill -USR1 to increase verbosity (error => info for example) +# kill -USR2 to decrease verbosity + +log_level=info + + +# var: logger-type +# brief: type of log output: stdout or to a file + +logger-type=file + + +# var: logger-file +# brief: in case of logger-type=file, logs will be written in this file + +logger-file=/var/log/centreon-agent/centagent.log + + +# var: logger-max-file-size +# brief: max log file size in bytes until rotate + +logger-max-file-size=10000000 + + +# var: logger-max-files +# brief: max number of log files (oldest will be removed) + +logger-max-files=3 + + +# var: endpoint +# brief: This parameter is mandatory +# In normal case (agent connects to engine), this endpoint is the +# opentelemetry listening endpoint of engine +# His syntax is :port + +#endpoint=:4317 + + +# var: encryption +# brief: false by default +# set to true to enable encryption between engine and agent + +encryption=false + + +# var: certificate +# brief: path of the certificate file used by encryption + +#certificate=/etc/centron-agent/certif.crt + + +# var: private_key +# brief: path of the key file of the certificate file + +#private_key=/etc/centreon-agent/certif.key + + +# var: ca_certificate +# brief: path of the authority certificate file used by encryption + +#ca_certificate=/etc/centreon-agent/ca.crt + + +# var: ca_name +# brief: name of the host declared in authority certificate + +#ca_name= + + +# var: host +# brief: name of the host declared in centreon configuration +# if not given, hostname of the computer will be used + +#host= + + +# var: reversed-grpc-streaming +# brief: used when centreon agent is not allowed to connect to poller +# if this option if set to true, centreon agent become a +# grpc server listening on pair interface:port given by +# endpoint parameter where poller will have to connect to + +reversed-grpc-streaming=false + + +# var: host +# brief: name of the host declared in centreon configuration +# if not given, hostname of the computer will be used + +#host= + + + + diff --git a/agent/scripts/centagent.service.in b/agent/scripts/centagent.service.in new file mode 100644 index 00000000000..3999c5d3cb6 --- /dev/null +++ b/agent/scripts/centagent.service.in @@ -0,0 +1,32 @@ +# +# Copyright 2016 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 +# + +[Unit] +Description=Centreon Agent +PartOf=centreon.service +After=centreon.service +ReloadPropagatedFrom=centreon.service + +[Service] +ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/@CENTREON_AGENT@ --config-file @PREFIX_AGENT_CONF@/@CENTREON_AGENT@.cfg +ExecReload=/bin/kill -HUP $MAINPID +Type=simple +User=centreon-agent + +[Install] +WantedBy=centreon.service diff --git a/packaging/centagent.yaml b/packaging/centagent.yaml index 4b0d8d9b65b..7a9c5d06c45 100644 --- a/packaging/centagent.yaml +++ b/packaging/centagent.yaml @@ -1,4 +1,4 @@ -name: "centagent" +name: "centreon-agent" arch: "${ARCH}" platform: "linux" version_schema: "none" @@ -15,9 +15,54 @@ homepage: "https://www.centreon.com" license: "Apache-2.0" contents: + - src: "../agent/conf/centagent.cfg" + dst: "/etc/centreon-agent/centagent.cfg" + type: config|noreplace + file_info: + mode: 0664 + owner: centreon-agent + group: centreon-agent + + - src: "../agent/scripts/centagent.service" + dst: "/usr/lib/systemd/system/centagent.service" + file_info: + mode: 0644 + packager: rpm + - src: "../agent/scripts/centagent.service" + dst: "/lib/systemd/system/centagent.service" + file_info: + mode: 0644 + packager: deb + - src: "../build/agent/centagent" dst: "/usr/bin/centagent" + - dst: "/etc/centreon-agent" + type: dir + file_info: + mode: 0775 + owner: centreon-agent + group: centreon-agent + + - dst: "/var/log/centreon-agent" + type: dir + file_info: + mode: 0755 + owner: centreon-agent + group: centreon-agent + + - src: "/usr/lib/nagios/plugins" + dst: "/usr/lib64/nagios/plugins" + type: symlink + packager: deb + +scripts: + preinstall: ./scripts/centreon-agent-daemon-preinstall.sh + postinstall: ./scripts/centreon-agent-daemon-postinstall.sh + preremove: ./scripts/centreon-agent-daemon-preremove.sh + postremove: ./scripts/centreon-agent-daemon-postremove.sh + + rpm: summary: Centreon Collect Agent. It can be used to execute remotely plugins compression: zstd diff --git a/packaging/centreon-agent-selinux.yaml b/packaging/centreon-agent-selinux.yaml new file mode 100644 index 00000000000..068b0004b24 --- /dev/null +++ b/packaging/centreon-agent-selinux.yaml @@ -0,0 +1,40 @@ +name: "centreon-agent-selinux" +arch: "${ARCH}" +platform: "linux" +version_schema: "none" +version: "${VERSION}" +release: "${RELEASE}${DIST}" +section: "default" +priority: "optional" +maintainer: "Centreon " +description: | + SELinux context for centreon-agent +vendor: "Centreon" +homepage: "https://centreon.com" +license: "Apache-2.0" + +depends: + - policycoreutils + - centreon-common-selinux +replaces: + - centreon-agent-selinux-debuginfo +conflicts: + - centreon-agent-selinux-debuginfo +provides: + - centreon-agent-selinux-debuginfo + +contents: + - src: "../selinux/centreon-agent/centreon-agent.pp" + dst: "/usr/share/selinux/packages/centreon/centreon-agent.pp" + file_info: + mode: 0655 + +scripts: + postinstall: ./scripts/centreon-agent-selinux-postinstall.sh + preremove: ./scripts/centreon-agent-selinux-preremove.sh + +rpm: + summary: SELinux context for centreon-agent + signature: + key_file: ${RPM_SIGNING_KEY_FILE} + key_id: ${RPM_SIGNING_KEY_ID} diff --git a/packaging/scripts/centreon-agent-daemon-postinstall.sh b/packaging/scripts/centreon-agent-daemon-postinstall.sh new file mode 100644 index 00000000000..87bebfa5649 --- /dev/null +++ b/packaging/scripts/centreon-agent-daemon-postinstall.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +startCentagent() { + systemctl daemon-reload ||: + systemctl unmask centagent.service ||: + systemctl preset centagent.service ||: + systemctl enable centagent.service ||: + systemctl restart centagent.service ||: +} + +# on debian, it is needed to recreate centreon-agent user at each upgrade because it is removed on postrm step on versions < 23.10 +if [ "$1" = "configure" ] ; then + if [ ! "$(getent passwd centreon-agent)" ]; then + adduser --system --group --shell /bin/bash --no-create-home centreon-agent + fi + if [ "$(getent passwd nagios)" ]; then + usermod -a -G centreon-agent nagios + fi + chown -R centreon-agent:centreon-agent \ + /etc/centreon-agent \ + /var/log/centreon-agent +fi + +startCentagent + diff --git a/packaging/scripts/centreon-agent-daemon-postremove.sh b/packaging/scripts/centreon-agent-daemon-postremove.sh new file mode 100644 index 00000000000..d550f7b752f --- /dev/null +++ b/packaging/scripts/centreon-agent-daemon-postremove.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +case "$1" in + purge) + deluser centreon-agent || : + delgroup centreon-agent || : + ;; +esac diff --git a/packaging/scripts/centreon-agent-daemon-preinstall.sh b/packaging/scripts/centreon-agent-daemon-preinstall.sh new file mode 100644 index 00000000000..6a0afa62e14 --- /dev/null +++ b/packaging/scripts/centreon-agent-daemon-preinstall.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +if ! id centreon-agent > /dev/null 2>&1; then + useradd -r centreon-agent > /dev/null 2>&1 +fi + +if id -g nagios > /dev/null 2>&1; then + usermod -a -G centreon-agent nagios +fi + diff --git a/packaging/scripts/centreon-agent-daemon-preremove.sh b/packaging/scripts/centreon-agent-daemon-preremove.sh new file mode 100644 index 00000000000..e156b0c586e --- /dev/null +++ b/packaging/scripts/centreon-agent-daemon-preremove.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +systemctl stop centagent.service ||: diff --git a/packaging/scripts/centreon-agent-selinux-postinstall.sh b/packaging/scripts/centreon-agent-selinux-postinstall.sh new file mode 100644 index 00000000000..f58e756b6d5 --- /dev/null +++ b/packaging/scripts/centreon-agent-selinux-postinstall.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +install() { + semodule -i /usr/share/selinux/packages/centreon/centreon-engine.pp > /dev/null 2>&1 || : +} + +upgrade() { + semodule -i /usr/share/selinux/packages/centreon/centreon-engine.pp > /dev/null 2>&1 || : +} + +action="$1" +if [ "$1" = "configure" ] && [ -z "$2" ]; then + action="install" +elif [ "$1" = "configure" ] && [ -n "$2" ]; then + action="upgrade" +fi + +case "$action" in + "1" | "install") + install + ;; + "2" | "upgrade") + upgrade + ;; +esac diff --git a/packaging/scripts/centreon-agent-selinux-preremove.sh b/packaging/scripts/centreon-agent-selinux-preremove.sh new file mode 100644 index 00000000000..0b68b4805d5 --- /dev/null +++ b/packaging/scripts/centreon-agent-selinux-preremove.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ "$1" -lt "1" ]; then # Final removal + semodule -r centreon-agent > /dev/null 2>&1 || : +fi diff --git a/selinux/centreon-agent/centreon-agent.fc b/selinux/centreon-agent/centreon-agent.fc new file mode 100644 index 00000000000..7b127e8eb07 --- /dev/null +++ b/selinux/centreon-agent/centreon-agent.fc @@ -0,0 +1 @@ +/usr/bin/centagent -- gen_context(system_u:object_r:centreon_agent_exec_t,s0) diff --git a/selinux/centreon-agent/centreon-agent.if b/selinux/centreon-agent/centreon-agent.if new file mode 100644 index 00000000000..fbeed8af430 --- /dev/null +++ b/selinux/centreon-agent/centreon-agent.if @@ -0,0 +1 @@ +## Centreon Agent monitoring agent. diff --git a/selinux/centreon-agent/centreon-agent.te b/selinux/centreon-agent/centreon-agent.te new file mode 100644 index 00000000000..9bc1e0013a2 --- /dev/null +++ b/selinux/centreon-agent/centreon-agent.te @@ -0,0 +1,170 @@ +policy_module(centreon-agent, @VERSION@) + +######################################## +# +# Declarations +# +require { + type centreon_agent_t; + type centreon_etc_t; + type unconfined_t; + type unconfined_service_t; + type setroubleshootd_t; + type init_t; + type kernel_t; + type fs_t; + type bin_t; + type tmp_t; + type node_t; + type httpd_t; + type ld_so_cache_t; + type ldconfig_exec_t; + type sysfs_t; + type sysctl_net_t; + type var_log_t; + type var_lib_t; + type cert_t; + type nagios_unconfined_plugin_exec_t; + type snmpd_var_lib_t; + type mysqld_db_t; + type ssh_exec_t; + type ssh_home_t; + type setfiles_t; + type unconfined_domain_type; +} + +type centreon_agent_t; +type centreon_agent_exec_t; +init_daemon_domain(centreon_agent_t, centreon_agent_exec_t) + +######################################## +# +# Centreon local policy +# + +allow centreon_agent_t self:process { setpgid signal_perms execmem }; +allow centreon_agent_t self:fifo_file { read open getattr ioctl write rw_fifo_file_perms }; +allow centreon_agent_t self:tcp_socket { create accept listen bind setopt getopt getattr shutdown }; +allow centreon_agent_t self:udp_socket { create accept listen bind setopt getopt getattr }; +allow centreon_agent_t self:file { create read open write getattr read_file_perms relabelto unlink rename }; +allow centreon_agent_t self:dir { add_name write remove_name }; +allow centreon_agent_t self:capability { setuid net_raw }; +allow centreon_agent_t self:rawip_socket { create read write setopt }; +allow centreon_agent_t fs_t:filesystem associate; +allow centreon_agent_t ld_so_cache_t:file execute; +allow centreon_agent_t bin_t:file { execute execute_no_trans }; +allow centreon_agent_t sysfs_t:dir read; +allow centreon_agent_t sysctl_net_t:dir search; +allow centreon_agent_t sysctl_net_t:file { open read getattr }; +allow centreon_agent_t cert_t:dir search; +allow centreon_agent_t node_t:tcp_socket node_bind; +allow centreon_agent_t nagios_unconfined_plugin_exec_t:file { open read execute execute_no_trans }; +allow centreon_agent_t var_log_t:dir { write add_name remove_name }; +allow centreon_agent_t var_log_t:file { create open write read setattr unlink }; +allow centreon_agent_t snmpd_var_lib_t:dir { open read getattr search }; +allow centreon_agent_t snmpd_var_lib_t:file { open read getattr }; +allow centreon_agent_t centreon_agent_t:dir search; +allow centreon_agent_t centreon_agent_t:fifo_file { open read getattr ioctl }; +allow centreon_agent_t ldconfig_exec_t:file { open execute getattr ioctl read}; +allow centreon_agent_t tmp_t:dir { add_name search getattr setattr write unlink create open read remove_name rmdir }; +allow centreon_agent_t tmp_t:file { getattr setattr write unlink create open read }; +allow centreon_agent_t centreon_etc_t:dir { add_name search getattr setattr write unlink create open read remove_name rmdir }; +allow centreon_agent_t ssh_exec_t:file { create read open write getattr setattr read_file_perms relabelto unlink rename ioctl }; +allow centreon_agent_t ssh_home_t:dir { add_name search getattr setattr write unlink create open read remove_name rmdir }; +allow centreon_agent_t ssh_home_t:file { create read open write getattr setattr read_file_perms relabelto unlink rename ioctl }; + +#============= setroubleshootd_t ============== +allow setroubleshootd_t centreon_agent_t:file getattr; +allow setroubleshootd_t centreon_agent_t:dir { search getattr }; +allow setroubleshootd_t centreon_agent_t:fifo_file getattr; + +#============= unconfined_t ============== +allow unconfined_t centreon_agent_t:dir { getattr setattr search relabelto relabelfrom create write add_name }; +allow unconfined_t centreon_agent_t:file { create read open write getattr setattr read_file_perms relabelto unlink rename ioctl }; +allow unconfined_t centreon_agent_t:fifo_file { read open getattr ioctl write setattr }; + +#============= unconfined_service_t ============== +allow unconfined_service_t centreon_agent_t:fifo_file { open read write getattr ioctl }; +allow unconfined_service_t centreon_agent_t:dir { getattr setattr search relabelto relabelfrom create write add_name remove_name }; +allow unconfined_service_t centreon_agent_t:file { create read open write getattr setattr read_file_perms relabelto unlink rename ioctl }; + +#============= httpd_t ============== +allow httpd_t centreon_agent_t:dir { search getattr }; +allow httpd_t centreon_agent_t:fifo_file { open read write getattr }; +allow httpd_t centreon_agent_t:file { execute execute_no_trans map open read getattr setattr }; +allow httpd_t centreon_agent_exec_t:file { execute execute_no_trans map open read getattr setattr }; + +#============= setfiles_t ============== +allow setfiles_t centreon_agent_t:dir relabelto; +allow setfiles_t centreon_agent_t:fifo_file relabelto; +allow setfiles_t centreon_agent_t:file relabelto; + +#============= init_t ============== +allow init_t centreon_agent_t:dir { add_name open read remove_name write search }; +allow init_t centreon_agent_t:fifo_file { create open read write getattr unlink }; +allow init_t centreon_agent_t:file { create execute execute_no_trans getattr map open read unlink write rename }; + +#============= kernel_t ============== +allow kernel_t centreon_agent_t:dir { add_name open read remove_name write search }; +allow kernel_t centreon_agent_t:fifo_file { create open read write getattr unlink }; +allow kernel_t centreon_agent_t:file { create execute execute_no_trans getattr map open read unlink write rename }; + +#============= cluster =============== +allow daemon initrc_transition_domain:fifo_file { ioctl read write getattr lock append }; +allow centreon_agent_t domain:lnk_file { read getattr }; +allow centreon_agent_t domain:dir { ioctl read getattr lock search open }; +allow domain unconfined_domain_type:association recvfrom; +allow domain domain:key { search link }; +allow domain unconfined_domain_type:tcp_socket recvfrom; +allow centreon_agent_t domain:file { ioctl read getattr lock open }; +allow daemon initrc_domain:fd use; +allow daemon initrc_domain:process sigchld; +allow domain unconfined_domain_type:peer recv; +allow daemon initrc_transition_domain:fd use; +allow daemon initrc_domain:fifo_file { ioctl read write getattr lock append }; + +kernel_read_kernel_sysctls(centreon_agent_t) +kernel_read_net_sysctls(centreon_agent_t) +kernel_read_network_state(centreon_agent_t) +kernel_read_system_state(centreon_agent_t) +kernel_request_load_module(centreon_agent_t) + +corecmd_exec_bin(centreon_agent_t) +corecmd_exec_shell(centreon_agent_t) + +corenet_port(centreon_agent_t) +corenet_all_recvfrom_unlabeled(centreon_agent_t) +corenet_all_recvfrom_netlabel(centreon_agent_t) +corenet_tcp_sendrecv_generic_if(centreon_agent_t) +corenet_udp_sendrecv_generic_if(centreon_agent_t) +corenet_tcp_sendrecv_generic_node(centreon_agent_t) +corenet_udp_sendrecv_generic_node(centreon_agent_t) +corenet_tcp_bind_generic_node(centreon_agent_t) +corenet_udp_bind_generic_node(centreon_agent_t) +corenet_sendrecv_all_client_packets(centreon_agent_t) +corenet_tcp_connect_all_ports(centreon_agent_t) +corenet_tcp_sendrecv_all_ports(centreon_agent_t) + +corenet_sendrecv_inetd_child_server_packets(centreon_agent_t) +corenet_tcp_bind_inetd_child_port(centreon_agent_t) +corenet_tcp_sendrecv_inetd_child_port(centreon_agent_t) + +dev_read_sysfs(centreon_agent_t) +dev_read_urand(centreon_agent_t) + +domain_use_interactive_fds(centreon_agent_t) +domain_read_all_domains_state(centreon_agent_t) + +files_read_etc_runtime_files(centreon_agent_t) +files_read_usr_files(centreon_agent_t) + +fs_getattr_all_fs(centreon_agent_t) +fs_search_auto_mountpoints(centreon_agent_t) + +auth_use_nsswitch(centreon_agent_t) + +logging_send_syslog_msg(centreon_agent_t) + +miscfiles_read_localization(centreon_agent_t) + +userdom_dontaudit_use_unpriv_user_fds(centreon_agent_t) diff --git a/tests/broker-engine/opentelemetry.robot b/tests/broker-engine/opentelemetry.robot index 020196c8640..bd299bba613 100644 --- a/tests/broker-engine/opentelemetry.robot +++ b/tests/broker-engine/opentelemetry.robot @@ -405,7 +405,7 @@ BEOTEL_CENTREON_AGENT_CHECK_HOST Ctn Engine Config Add Command ... ${0} ... otel_check_icmp - ... /usr/lib/nagios/plugins/check_icmp 127.0.0.1 + ... /bin/echo "OK - 127.0.0.1: rta 0,010ms, lost 0%|rta=0,010ms;200,000;500,000;0; pl=0%;40;80;; rtmax=0,035ms;;;; rtmin=0,003ms;;;;" ... OTEL connector Ctn Engine Config Set Value 0 log_level_checks trace @@ -517,7 +517,7 @@ BEOTEL_REVERSE_CENTREON_AGENT_CHECK_HOST Ctn Engine Config Add Command ... ${0} ... otel_check_icmp - ... /usr/lib/nagios/plugins/check_icmp 127.0.0.1 + ... /bin/echo "OK - 127.0.0.1: rta 0,010ms, lost 0%|rta=0,010ms;200,000;500,000;0; pl=0%;40;80;; rtmax=0,035ms;;;; rtmin=0,003ms;;;;" ... OTEL connector Ctn Engine Config Set Value 0 log_level_checks trace @@ -632,7 +632,7 @@ BEOTEL_CENTREON_AGENT_CHECK_HOST_CRYPTED Ctn Engine Config Add Command ... ${0} ... otel_check_icmp - ... /usr/lib/nagios/plugins/check_icmp 127.0.0.1 + ... /bin/echo "OK - 127.0.0.1: rta 0,010ms, lost 0%|rta=0,010ms;200,000;500,000;0; pl=0%;40;80;; rtmax=0,035ms;;;; rtmin=0,003ms;;;;" ... OTEL connector Ctn Engine Config Set Value 0 log_level_checks trace @@ -685,7 +685,7 @@ BEOTEL_REVERSE_CENTREON_AGENT_CHECK_HOST_CRYPTED Ctn Engine Config Add Command ... ${0} ... otel_check_icmp - ... /usr/lib/nagios/plugins/check_icmp 127.0.0.1 + ... /bin/echo "OK - 127.0.0.1: rta 0,010ms, lost 0%|rta=0,010ms;200,000;500,000;0; pl=0%;40;80;; rtmax=0,035ms;;;; rtmin=0,003ms;;;;" ... OTEL connector Ctn Engine Config Set Value 0 log_level_checks trace