-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5078c3c
commit 8c7d92e
Showing
26 changed files
with
701 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 : [email protected] | ||
# | ||
|
||
# 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 () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# | ||
# 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 : [email protected] | ||
# | ||
|
||
# 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: in case of log-type=file, logs will be written in this file | ||
|
||
log-file=@AGENT_VAR_LOG_DIR@/@[email protected] | ||
|
||
|
||
# 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 <pid> to decrease verbosity (error => info for example) | ||
# kill -USR2 <pid> to increase verbosity | ||
|
||
log-level=info | ||
|
||
|
||
# var: log-type | ||
# brief: type of log output: stdout or to a file | ||
|
||
log-type=file | ||
|
||
# var: log-max-file-size | ||
# brief: max log file size in bytes until rotate | ||
|
||
log-max-file-size=10000000 | ||
|
||
|
||
# var: log-max-files | ||
# brief: max number of log files (oldest will be removed) | ||
|
||
log-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 <ip or dns name>:port | ||
|
||
#endpoint=<poller ip>: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 | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# | ||
# 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 : [email protected] | ||
# | ||
|
||
[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@/@[email protected] | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
Type=simple | ||
User=centreon-agent | ||
|
||
[Install] | ||
WantedBy=default.target | ||
|
Oops, something went wrong.