| Scroll Ignore | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
|
Concept
Cette page explique les paramètres présents dans le fichier /etc/shinken/synchronizer.cfg
Si vous souhaitez Pour apporter des modifications à ces paramètres, il est conseillé de modifier
- Shinken conseille fortement de les surcharger dans le fichier
- /etc/shinken-user/configuration/daemons/synchronizers/synchronizer_cfg_overload.cfg
Configuration des logs
- ( voir la page Surcharge des paramètres du démon ( synchronizer_cfg_overload.cfg ) ).
- Les paramètres sont présents dans ce fichier pour indiquer qu'ils existent, mais leur modification dans le fichier de surcharge permettra une meilleure gestion ( ne pas modifier ce que l'on livre par défaut, mais le surcharger ).
Exemple de fichier de configuration
La partie des logs du Synchronizer se gère avec ces paramètres :| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
#================================================================================ # SYNCHRONIZER #== #======== logging ========= # The synchronizer can have it's own local log local_log=/var/log/shinken/synchronizerd.log # If you disable, the timestamp will be an epoch integer instead of a human date human_timestamp_log=1 ============================================================= # This file contains values for: # - the global parameters # - the synchronizer parameters # IMPORTANT : DO NOT EDIT THIS FILE. This file will be overwritten at every update with the default values #================================================================================== |
Les paramètres sont les suivants :
Paramètres du démon
Les paramètres suivants permettent de configurer le démon sur le serveur :
| Code Block | ||||
|---|---|---|---|---|
| ||||
#==================================================================================
#======== System synchronizer daemon parameters (user, group, pid, ...) =========
# Lock file (with pid) for the sycnhronizer daemon
lock_file=/var/run/shinken/synchronizerd.pid
# User that will be used by the synchronizer
shinken_user=shinken
shinken_group=shinken
# Set to 0 if you want to make this daemon NOT run
daemon_enabled=1
# The path to the modules directory
modules_dir=/var/lib/shinken/modules
# The path to the share files
share_dir=/var/lib/shinken/share
#==================================================================================
#==================================================================================
#======== Listening address (daemon) =========
# If enabled, the synchronizer daemon will listen in HTTPS instead of HTTP protocol.
# Note: default pem/cert and key files are for sample only. You need to generate
# your own with your PKI.
# by default: 0 (disabled)
use_ssl=0
ca_cert=/etc/shinken/certs/ca.pem
server_cert=/etc/shinken/certs/server.cert
server_key=/etc/shinken/certs/server.key
# Should the synchronizer connections will force the HTTPS certificates name checks
# If enabled and a distant certificate is not the same as the daemon address, then
# the connection will be refused.
hard_ssl_name_check=0
# Which HTTP backend to start the listening daemon with.
# Currently only auto is managed
http_backend=auto
# Which addr to bind for the synchronizer daemon
# by default: 0.0.0.0 (all interfaces)
bind_addr=0.0.0.0
#==================================================================================
|
| Warning |
|---|
Pour Activer ou désactiver le Synchronizer, utilisez les commandes suivantes plutôt que modifier le paramètre daemon_enabled :
Ces commandes permettent de vérifier que le Synchronizer est dans un état correct avant de démarrer afin de ne pas corrompre la base de données (exécution de sanatize-data) |
Les paramètres sont les suivants :
| Info | ||
|---|---|---|
| ||
Par défaut un certificat auto signé est livré afin de pouvoir mettre en place rapidement et facilement une sécurité sur les communications des démons. Il est conseillé d'utiliser vos propres certificats surs du plus long terme. |
Configuration de l'interface de configuration
Les paramètres suivants permettent de configurer l'interface accessible depuis votre navigateur :
| Code Block | ||||
|---|---|---|---|---|
| ||||
#==================================================================================
#======== Listening address (Configuration interface) =========
# Http(s) port to listen the Configuration interface
http_port=7766
# Select the lang that will be used by default on the UIs
# Currently managed:
# -en (english)
# -fr (francais)
lang=fr
# set the Configuration interface into HTTPs or not (disabled by default)
http_use_ssl=0
# Mandatory is SSL is enabled: server key and certificate
http_ssl_cert=/etc/shinken/certs/server.cert
http_ssl_key=/etc/shinken/certs/server.key
# Cookie secret password. Is used to crypt cookies
auth_secret=AUTH-SECRET-_RqRGhiNimAebzJRAY6Hx3mGGbxSlq_gx7Jirdz9ki4co8rK9yeQ8f_1qWDuRXT8CSTeHgXBZ9N1eKBwuQnh9-5sWmZJn5e2MHOOk0jC7gIUFzfUeJsSHVRx3YLEBRpIP9WjYfGoPNkPq4tE64aZlR1Mukj_iRnC-D8KX4P0zHKj_BJP_aws_ZzKR5l36rGrPozfdW0KryhdDTrwEg-me34MM22uQDjk_jYAF--ZHRMGgE5jY3gd_fXXlBEH29Ao
# Master key for CLI access
master_key=MASTERKEY-KUMi_DY49LtZTLI3XMiabDT5f_OyErn-8oH1Ew0z7kv86y5zNjm2bJ-Wf50cfy5Hwc1BTMBhA747p0_sKwd-YAtbD2D9mmBY8ecBAvMmXIqRCaAe86GyBrQzQRaLz6_x38rjBT1ImAcwZwwE1U1tiI3qhLS4cRsRZHCP_DcKJ2XTDbYL7eoeBdc9FRUApTmP6S5xdonY6_lteiBiUgceuJQkbCy94l6Es5yTzCH3PDqj11hy86hE9yekAmkgZkJz
# Remote application authentification
# if 1: allow the user to be load from a HTTP Header
http_remote_user_enable=0
# which HTTP header to get user name if remote_user_enable is 1
http_remote_user_variable=X_Remote_User
# if remote_user_enable is 1,
# http_remote_user_case_sensitive to 1 enable case check on remote user login
# http_remote_user_case_sensitive to 0 disable case check on remote user login
# default value : 1, login is case sensitive
http_remote_user_case_sensitive=1
#==================================================================================
#==================================================================================
#======== INTERNAL OPTIONS =========
# On source page, some errors or warnings may concern many elements. A summary is shown
# for this error and you can set the number of message who are in this summary.
number_of_message_in_source_summary=5
#==================================================================================
|
Les paramètres sont les suivants :
Clé d'identification générée à l'installation sur le Synchronizer, qui permet aux démons de s'identifier auprès de l'interface de configuration comme faisant partie intégrante de la même installation. Cela permet qu'un démon ou un module ( voir la page Module synchronizer-import ) requête l'interface de configuration.
Configuration de la base de données du Synchronizer
La base de données utilisées est MongoDb. Pour la configurer, vous aurez besoin de modifier les paramètres suivants :
| Code Block | ||||
|---|---|---|---|---|
| ||||
#==================================================================================
#======== Mongodb database connection =========
# database type. currently only mongodb is managed.
data_backend=mongodb
# mongodb uri definition for connecting to the mongodb database. You can find the mongodb uri
# syntax at https://docs.mongodb.com/manual/reference/connection-string/
mongodb_uri=mongodb://localhost/?safe=false
# mongodb database to use for this daemon.
mongodb_database=synchronizer
# If you want to securize your mongodb connection you can enable the ssh use_ssh_tunnel that will
# allow all mongodb to be encrypted & authentificated with SSH
# Should use a SSH tunnel (Default 0=False)
mongodb_use_ssh_tunnel=0
# If the SSH connection goes wrong, then retry use_ssh_retry_failure time
# Default: 1
mongodb_use_ssh_retry_failure=1
# SSH user/keyfile in order to connect to the mongodb server.
# Default: shinken
mongodb_ssh_user=shinken
# Default: ~shinken/.ssh/id_rsa
mongodb_ssh_keyfile=~shinken/.ssh/id_rsa
# Timeout to wait for mongodb queries, in seconds
# Default: 120
mongodb_mongo_timeout=120
# By default bailout the sychronizer if cannot contact mongodb for more than 120s
mongodb_retry_timeout=120
# The time the history will be kept for syncronizations into database (in minutes)
sync_history_lifespan=1440
#==================================================================================
|
Les paramètres sont les suivants :
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ──────────────────────────────── MODULES AND ARCHITECTURE ( DON'T MODIFY ) ──────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── Modules definition ───
# ─── ───
cfg_dir=modules
# ─── Arbiters definition ───
# ─── ───
cfg_dir=arbiters
# ─── Schedulers definition ───
# ─── ───
cfg_dir=schedulers
# ─── Pollers definition ───
# ─── ───
cfg_dir=pollers
# ─── Reactionners definition ───
# ─── ───
cfg_dir=reactionners
# ─── Brokers definition ───
# ─── ───
cfg_dir=brokers
# ─── Receivers definition ───
# ─── ───
cfg_dir=receivers
# ─── Realms definition ───
# ─── ───
cfg_dir=realms
# ─── Synchronizers definition ───
# ─── ───
cfg_dir=synchronizers
# ─── Sources definition ───
# ─── ───
cfg_dir=sources
# ─── Listeners definition ───
# ─── ───
cfg_dir=listeners
# ─── Analyzers definition ───
# ─── ───
cfg_dir=analyzers
# ─── Taggers definition ───
# ─── ───
cfg_dir=taggers
# ─── Discovery rules definition ───
# ─── ───
cfg_dir=discovery_rules
# ─── Synchronizer discovery definition ───
# ─── ───
cfg_file=synchronizer_discovery.cfg
# ─── Packs dir definition ───
# ─── ───
packs_dir=packs
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ─────────────────────────── GLOBAL DATA AND DEFAULT PROPERTIES ( DON'T MODIFY ) ─────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── You will find global DATA into this directory ───
# ─── ───
cfg_dir=resource.d
# ─── Load default properties for types (like hosts). Do not edit theses files, they are overwritten at every update ───
# ─── ───
cfg_dir=_default/elements_default_properties
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ───────────────────────────────────────── DAEMON LOGS PARAMETERS ────────────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── The synchronizer daemon log ───
# ─── ───
local_log=/var/log/shinken/synchronizerd.log
# ─── If you disable, the timestamp will be an epoch integer instead of a human date ───
# ───
# ... : 0 => timestamp ───
# ... : 1 => human date ───
# ─── ───
human_timestamp_log=1
# ─── Set logging level for the Synchronizer daemon. ───
# ───
# ... : accepted values: DEBUG,INFO,WARNING,ERROR,CRITICAL ───
# Default : INFO ( info, warning and error logs will be shown ) ───
# ─── ───
log_level=INFO
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ───────────────────────────────── EXTERNAL AUTHENTICATION LOGS PARAMETERS ───────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── Log the synchronizer authentication and Session history in a file ───
# ───
# ... : 1 => Enable ───
# Default : 0 => Disable ───
# ─── ───
# synchronizer__log_users__enabled=0
# ─── File use for log authentication and Session history ───
# ─── ───
# synchronizer__log_users__file_path=/var/log/shinken/synchronizer/log_users.log
# ─── Add user name to log ───
# ───
# ... : 1 => Enable ───
# Default : 0 => Disable ───
# ─── ───
# synchronizer__log_users__add_user_name=0
# ─── The logs files will be daily rotated up to the number of configurated days. ───
# ─── All log files older than the configured number of days will be deleted automatically. ───
# ───
# Default : 7 (days) ───
# ─── ───
# synchronizer__log_users__logs_rotation__nb_days_before_deletion=7
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ─────────────────────────────────────────── SYSTEM AND SECURITY ─────────────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ── System daemon parameters (user, group, pid, ...) ─────────────────────────────────────────────────────────────── #
# ─── Run or not the daemon ───
# ───
# ... : 0 => Disable ───
# ... : 1 => Enable ───
# ─── ───
daemon_enabled=1
# ─── Lock file (with pid) for the synchronizer daemon ───
# ─── ───
lock_file=/var/run/shinken/synchronizerd.pid
# ─── User used by the synchronizer ───
# ─── ───
shinken_user=shinken
# ─── ───
shinken_group=shinken
# ─── The path to the modules directory ───
# ─── ───
modules_dir=/var/lib/shinken/modules
# ─── The path to the share files ───
# ─── ───
share_dir=/var/lib/shinken/share
# ───────────── Listening address (daemon) ────────────────────────────────────────────────────────────────────────── #
# ─── Which HTTP backend to start the listening daemon with. ───
# ─── Currently only auto is managed ───
# ─── ───
http_backend=auto
# ─── Which address to bind for the synchronizer daemon. ───
# ───
# Default : 0.0.0.0 => (all interfaces) ───
# ─── ───
bind_addr=0.0.0.0
# ─── Enable HTTPS. ───
# ───
# ... : 1 => Use HTTPS ───
# Default : 0 => Use HTTP ───
# ─── ───
use_ssl=0
# ─── Paths to pem/cert and key files ───
# ─── Note: default pem/cert and key files are for sample only. You need to generate ───
# ─── your own with your PKI. ───
# ─── ───
ca_cert=/etc/shinken/certs/ca.pem
# ─── ───
server_cert=/etc/shinken/certs/server.cert
# ─── ───
server_key=/etc/shinken/certs/server.key
# ─── Force the HTTPS certificates name checks by the synchronizer connections ───
# ─── If enabled and a distant certificate is not the same as the daemon address, then ───
# ─── the connection will be refused. ───
# ───
# ... : 0 => Disable ───
# Default : 1 => Enable ───
# ─── ───
hard_ssl_name_check=0
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ─────────────────────────────────────── MONGODB DATABASE CONNECTION ─────────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── Database type. currently only mongodb is managed. ───
# ─── ───
data_backend=mongodb
# ─── mongodb uri definition for connecting to the mongodb database. You can find the mongodb uri ───
# ─── syntax at https://docs.mongodb.com/manual/reference/connection-string/ ───
# ─── ───
mongodb_uri=mongodb://localhost/?safe=false
# ─── Mongodb database to use for this daemon. ───
# ─── ───
mongodb_database=synchronizer
# ─── username/password to authenticate to MongoDB. ───
# ─── Both parameters must be provided for authentication to function correctly. ───
# ─── ───
# synchronizer__database__username=
# ─── ───
# synchronizer__database__password=
# ─── Secure your mongodb connection ───
# ─── enable the ssh that will ───
# ─── allow all mongodb to be encrypted & authenticated with SSH ───
# ───
# ... : 1 => Enable ───
# Default : 0 => Disable ───
# ─── ───
mongodb_use_ssh_tunnel=0
# ─── If the SSH connection goes wrong, ───
# ─── then retry use_ssh_retry_failure time ───
# ───
# ... : 0 => Disable ───
# Default : 1 => Enable ───
# ─── ───
mongodb_use_ssh_retry_failure=1
# ─── SSH user/keyfile in order to connect to the mongodb server ───
# ─── ───
mongodb_ssh_user=shinken
# ─── ───
mongodb_ssh_keyfile=~shinken/.ssh/id_rsa
# ─── SSH Timeout used to test if the SSH tunnel is viable or not, in seconds ───
# ───
# Default : 2 (in seconds) ───
# ─── ───
mongodb_ssh_tunnel_timeout=2
# ─── By default bailout the synchronizer if cannot contact mongodb for more than 120s ───
# ───
# Default : 120 (in seconds) ───
# ─── ───
mongodb_retry_timeout=120
# ─── Each database request will be tried X times before considering it as an error and abort ───
# ───
# Default : 15 (in seconds) ───
# ─── ───
synchronizer__database__retry_connection_X_times_before_considering_an_error=15
# ─── We will wait X seconds between each try or any database request ───
# ───
# Default : 5 (in seconds) ───
# ─── ───
synchronizer__database__wait_X_seconds_before_reconnect=5
# ─── The time the history will be kept for synchronizations into database ───
# ───
# Default : 1440 (in minutes) ───
# ─── ───
sync_history_lifespan=1440
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ────────────────────────────────────────── ADDRESS AND SECURITY ─────────────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ──── Listening address (Configuration interface) ────────────────────────────────────────────────────────────────── #
# ─── Http(s) port to listen the Configuration interface. ───
# ─── ───
http_port=7766
# ─── set the Configuration interface into HTTPs or not (disabled by default). ───
# ───
# ... : 1 => Use HTTPS ───
# Default : 0 => Use HTTP ───
# ─── ───
http_use_ssl=0
# ─── Mandatory is SSL is enabled: server key and certificate. ───
# ─── ───
http_ssl_cert=/etc/shinken/certs/server.cert
# ─── ───
http_ssl_key=/etc/shinken/certs/server.key
# ──────────────────── Cypher keys ────────────────────────────────────────────────────────────────────────────────── #
# ─── Cookie secret password. Is used to crypt cookies. ───
# ─── ───
auth_secret=THIS SHOULD BE CHANGED BEFORE PRODUCTION
# ─── Master key for CLI access. ───
# ─── ───
master_key=MASTERKEY-SHOULDBECHANGED
# ───────────────── SSO authentication ────────────────────────────────────────────────────────────────────────────── #
# ─── Remote application authentication. ───
# ───
# ... : 1 => allow the user to be load from a HTTP Header ───
# Default : 0 => Disable ───
# ─── ───
http_remote_user_enable=0
# ─── From which HTTP header get user name if remote_user_enable is 1. ───
# ─── ───
http_remote_user_variable=X-Remote-User
# ─── Case sensitivity of login if remote_user_enable is 1. ───
# ───
# ... : 0 => disable case check on remote user login ───
# Default : 1 => enable case check on remote user login ───
# ─── ───
http_remote_user_case_sensitive=1
# ───── Protected fields security ( Don't modify ) ────────────────────────────────────────────────────────────────── #
# ─── Encryption for protected fields ───
# ───
# ... : 1 => Enable ───
# Default : 0 => Disable ───
# ─── ───
protect_fields__activate_encryption=0
# ─── File containing the encryption key ───
# ───
# ... : 1 => Enable ───
# Default : 0 => Disable ───
# ─── ───
protect_fields__encryption_keyfile=/etc/shinken/secrets/protected_fields_key
# ─── List of words contained in protected fields names ───
# ───
# Default : PASSWORD,PASSPHRASE,PASSE,DOMAINUSER,MSSQLUSER,MYSQLUSER,ORACLE_USER,SSH_USER,LOGIN ───
# ─── ───
protect_fields__substrings_matching_fields=PASSWORD,PASSPHRASE,PASSE,DOMAINUSER,MSSQLUSER,MYSQLUSER,ORACLE_USER,SSH_USER,LOGIN
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ─────────────────────────────────── INTERFACE CONFIGURATION PARAMETERS ──────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ────────────────────── Language ─────────────────────────────────────────────────────────────────────────────────── #
# ─── Select the lang that will be used by default on the UIs. ───
# ─── Currently managed: ───
# ───
# ... : en => (english) ───
# ... : fr => (francais) ───
# ─── ───
lang=fr
# ────────────────────── Sources ──────────────────────────────────────────────────────────────────────────────────── #
# ─── On source page, some errors or warnings may concern many elements. ───
# ─── A summary is shown for this error and you can set the number ───
# ─── of message who are in this summary. ───
# ─── ───
number_of_message_in_source_summary=5
# ────────────────── Production page ──────────────────────────────────────────────────────────────────────────────── #
# ─── Timeout for the Arbiter to load a new configuration ───
# ─── ───
# synchronizer__production__apply_new_configuration_timeout=30
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ────────────────────────────────── FOLDER CONFIGURATION ( DON'T MODIFY ) ────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── When you need to customise element (host, check, ...) default properties value, set it in this directory ───
# ─── ───
cfg_dir=/etc/shinken-user/configuration/monitoring_policy
# ─── For custom global DATA ───
# ─── ───
cfg_dir=/etc/shinken-user/configuration/global-data
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ────────────────────────────── EXTENDED FILE CONFIGURATION ( DON'T MODIFY ) ─────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── When you need to customise a value for the Synchronizer, set it in this file ───
# ─── ───
cfg_file=/etc/shinken-user/configuration/daemons/synchronizers/synchronizer_cfg_overload.cfg
|
Détails des sections composant le fichier de configuration
Paramètres de fonctionnement interne ( à ne pas modifier )
| Warning |
|---|
Les paramètres suivants sont gérés par Shinken. Ils peuvent être modifiés par les commandes Shinken ou par l'installeur. Il est conseillé de ne pas modifier les valeurs. Les paramètres sont modifiables ( voir la page Surcharge des paramètres du démon ( synchronizer_cfg_overload.cfg ) ). |
| Code Block | ||||
|---|---|---|---|---|
| ||||
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ──────────────────────────────────────── MODULES AND ARCHITECTURE ───────────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── /!\ Sub directories to load. Do not edit ───
# ─── Modules definition ───
# ─── ───
cfg_dir=modules
# ─── Arbiters definition ───
# ─── ───
cfg_dir=arbiters
# ─── Schedulers definition ───
# ─── ───
cfg_dir=schedulers
# ─── Pollers definition ───
# ─── ───
cfg_dir=pollers
# ─── Reactionners definition ───
# ─── ───
cfg_dir=reactionners
# ─── Brokers definition ───
# ─── ───
cfg_dir=brokers
# ─── Receivers definition ───
# ─── ───
cfg_dir=receivers
# ─── Realms definition ───
# ─── ───
cfg_dir=realms
# ─── Synchronizers definition ───
# ─── ───
cfg_dir=synchronizers
# ─── Sources definition ───
# ─── ───
cfg_dir=sources
# ─── Listeners definition ───
# ─── ───
cfg_dir=listeners
# ─── Analyzers definition ───
# ─── ───
cfg_dir=analyzers
# ─── Taggers definition ───
# ─── ───
cfg_dir=taggers
# ─── Discovery rules definition ───
# ─── ───
cfg_dir=discovery_rules
# ─── Synchronizer discovery definition ───
# ─── ───
cfg_file=synchronizer_discovery.cfg
# ─── Packs dir definition ───
# ─── ───
packs_dir=packs
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ─────────────────────────────────── GLOBAL DATA AND DEFAULT PROPERTIES ──────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── You will find global DATA into this directory ───
# ─── ───
cfg_dir=resource.d
# ─── Load default properties for types (like hosts). Do not edit theses files, they are overwritten at every update ───
# ─── ───
cfg_dir=_default/elements_default_properties |
Les logs du démon
| Code Block | ||||
|---|---|---|---|---|
| ||||
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ───────────────────────────────────────── DAEMON LOGS PARAMETERS ────────────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── The synchronizer daemon log ───
# ─── ───
local_log=/var/log/shinken/synchronizerd.log
# ─── If you disable, the timestamp will be an epoch integer instead of a human date ───
# ───
# ... : 0 => timestamp ───
# ... : 1 => human date ───
# ─── ───
human_timestamp_log=1
# ─── Set logging level for the Synchronizer daemon. ───
# ───
# ... : accepted values: DEBUG,INFO,WARNING,ERROR,CRITICAL ───
# Default : INFO ( info, warning and error logs will be shown ) ───
# ─── ───
log_level=INFO |
Les paramètres sont les suivants :
| Scroll Title | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
|
Les logs d'activité des utilisateurs ( authentification et session )
Les paramètres suivants permettent au Synchronizer de créer un fichier de log supplémentaire pour y recenser l'activité des utilisateurs ( authentification et session ), qu'elles soient réussites ou non, ainsi que les déconnexions.
- Shinken conseille fortement de les surcharger dans le fichier /etc/shinken-user/configuration/daemons/synchronizers/synchronizer_cfg_overload.cfg.
- Ils sont présents dans ce fichier pour indiquer qu'ils existent, mais leur modification dans le fichier de surcharge permettra une meilleure gestion ( ne pas modifier ce que l'on livre par défaut, mais le surcharger ).
| Code Block | ||||
|---|---|---|---|---|
| ||||
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ───────────────────────────────── EXTERNAL AUTHENTICATION LOGS PARAMETERS ───────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── Log the synchronizer authentication and Session history in a file ───
# ───
# ... : 1 => Enable ───
# Default : 0 => Disable ───
# ─── ───
# synchronizer__log_users__enabled=0
# ─── File use for log authentication and Session history ───
# ─── ───
# synchronizer__log_users__file_path=/var/log/shinken/synchronizer/log_users.log
# ─── Add user name to log ───
# ───
# ... : 1 => Enable ───
# Default : 0 => Disable ───
# ─── ───
# synchronizer__log_users__add_user_name=0
# ─── The logs files will be daily rotated up to the number of configurated days. ───
# ─── All log files older than the configured number of days will be deleted automatically. ───
# ───
# Default : 7 (days) ───
# ─── ───
# synchronizer__log_users__logs_rotation__nb_days_before_deletion=7 |
| Scroll Title | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||
|
Système et sécurité
| Code Block | ||||
|---|---|---|---|---|
| ||||
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ─────────────────────────────────────────── SYSTEM AND SECURITY ─────────────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ── System daemon parameters (user, group, pid, ...) ─────────────────────────────────────────────────────────────── #
# ─── Run or not the daemon ───
# ───
# ... : 0 => Disable ───
# ... : 1 => Enable ───
# ─── ───
daemon_enabled=1
# ─── Lock file (with pid) for the synchronizer daemon ───
# ─── ───
lock_file=/var/run/shinken/synchronizerd.pid
# ─── User used by the synchronizer ───
# ─── ───
shinken_user=shinken
# ─── ───
shinken_group=shinken
# ─── The path to the modules directory ───
# ─── ───
modules_dir=/var/lib/shinken/modules
# ─── The path to the share files ───
# ─── ───
share_dir=/var/lib/shinken/share
# ───────────── Listening address (daemon) ────────────────────────────────────────────────────────────────────────── #
# ─── Which HTTP backend to start the listening daemon with. ───
# ─── Currently only auto is managed ───
# ─── ───
http_backend=auto
# ─── Which address to bind for the synchronizer daemon. ───
# ───
# Default : 0.0.0.0 => (all interfaces) ───
# ─── ───
bind_addr=0.0.0.0
# ─── Enable HTTPS. ───
# ───
# ... : 1 => Use HTTPS ───
# Default : 0 => Use HTTP ───
# ─── ───
use_ssl=0
# ─── Paths to pem/cert and key files ───
# ─── Note: default pem/cert and key files are for sample only. You need to generate ───
# ─── your own with your PKI. ───
# ─── ───
ca_cert=/etc/shinken/certs/ca.pem
# ─── ───
server_cert=/etc/shinken/certs/server.cert
# ─── ───
server_key=/etc/shinken/certs/server.key
# ─── Force the HTTPS certificates name checks by the synchronizer connections ───
# ─── If enabled and a distant certificate is not the same as the daemon address, then ───
# ─── the connection will be refused. ───
# ───
# ... : 0 => Disable ───
# Default : 1 => Enable ───
# ─── ───
hard_ssl_name_check=0 |
Paramètres système du démon
| Scroll Title | |||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||
|
Configuration des adresses
| Scroll Title | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Configuration de la base de données
| Code Block | ||||
|---|---|---|---|---|
| ||||
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ─────────────────────────────────────── MONGODB DATABASE CONNECTION ─────────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── Database type. currently only mongodb is managed. ───
# ─── ───
data_backend=mongodb
# ─── mongodb uri definition for connecting to the mongodb database. You can find the mongodb uri ───
# ─── syntax at https://docs.mongodb.com/manual/reference/connection-string/ ───
# ─── ───
mongodb_uri=mongodb://localhost/?safe=false
# ─── Mongodb database to use for this daemon. ───
# ─── ───
mongodb_database=synchronizer
# ─── username/password to authenticate to MongoDB. ───
# ─── Both parameters must be provided for authentication to function correctly. ───
# ─── ───
# synchronizer__database__username=
# ─── ───
# synchronizer__database__password=
# ─── Secure your mongodb connection ───
# ─── enable the ssh that will ───
# ─── allow all mongodb to be encrypted & authenticated with SSH ───
# ───
# ... : 1 => Enable ───
# Default : 0 => Disable ───
# ─── ───
mongodb_use_ssh_tunnel=0
# ─── If the SSH connection goes wrong, ───
# ─── then retry use_ssh_retry_failure time ───
# ───
# ... : 0 => Disable ───
# Default : 1 => Enable ───
# ─── ───
mongodb_use_ssh_retry_failure=1
# ─── SSH user/keyfile in order to connect to the mongodb server ───
# ─── ───
mongodb_ssh_user=shinken
# ─── ───
mongodb_ssh_keyfile=~shinken/.ssh/id_rsa
# ─── SSH Timeout used to test if the SSH tunnel is viable or not, in seconds ───
# ───
# Default : 2 (in seconds) ───
# ─── ───
mongodb_ssh_tunnel_timeout=2
# ─── By default bailout the synchronizer if cannot contact mongodb for more than 120s ───
# ───
# Default : 120 (in seconds) ───
# ─── ───
mongodb_retry_timeout=120
# ─── Each database request will be tried X times before considering it as an error and abort ───
# ───
# Default : 15 (in seconds) ───
# ─── ───
synchronizer__database__retry_connection_X_times_before_considering_an_error=15
# ─── We will wait X seconds between each try or any database request ───
# ───
# Default : 5 (in seconds) ───
# ─── ───
synchronizer__database__wait_X_seconds_before_reconnect=5
# ─── The time the history will be kept for synchronizations into database ───
# ───
# Default : 1440 (in minutes) ───
# ─── ───
sync_history_lifespan=1440 |
| Scroll Title | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| Info |
|---|
Si la base de données n'est pas hébergée sur le même serveur que le Synchronizer, il est préférable d'utiliser le tunnel SSH afin de ne pas exposer le port de la base de données sur le serveur distant. |
Configuration de l'interface de configuration
| Code Block | ||||
|---|---|---|---|---|
| ||||
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ────────────────────────────────────────── ADDRESS AND SECURITY ─────────────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ──── Listening address (Configuration interface) ────────────────────────────────────────────────────────────────── #
# ─── Http(s) port to listen the Configuration interface. ───
# ─── ───
http_port=7766
# ─── set the Configuration interface into HTTPs or not (disabled by default). ───
# ───
# ... : 1 => Use HTTPS ───
# Default : 0 => Use HTTP ───
# ─── ───
http_use_ssl=0
# ─── Mandatory is SSL is enabled: server key and certificate. ───
# ─── ───
http_ssl_cert=/etc/shinken/certs/server.cert
# ─── ───
http_ssl_key=/etc/shinken/certs/server.key
# ──────────────────── Cypher keys ────────────────────────────────────────────────────────────────────────────────── #
# ─── Cookie secret password. Is used to crypt cookies. ───
# ─── ───
auth_secret=THIS SHOULD BE CHANGED BEFORE PRODUCTION
# ─── Master key for CLI access. ───
# ─── ───
master_key=MASTERKEY-SHOULDBECHANGED
# ───────────────── SSO authentication ────────────────────────────────────────────────────────────────────────────── #
# ─── Remote application authentication. ───
# ───
# ... : 1 => allow the user to be load from a HTTP Header ───
# Default : 0 => Disable ───
# ─── ───
http_remote_user_enable=0
# ─── From which HTTP header get user name if remote_user_enable is 1. ───
# ─── ───
http_remote_user_variable=X-Remote-User
# ─── Case sensitivity of login if remote_user_enable is 1. ───
# ───
# ... : 0 => disable case check on remote user login ───
# Default : 1 => enable case check on remote user login ───
# ─── ───
http_remote_user_case_sensitive=1
# ───── Protected fields security ( Don't modify ) ────────────────────────────────────────────────────────────────── #
# ─── Encryption for protected fields ───
# ───
# ... : 1 => Enable ───
# Default : 0 => Disable ───
# ─── ───
protect_fields__activate_encryption=0
# ─── File containing the encryption key ───
# ───
# ... : 1 => Enable ───
# Default : 0 => Disable ───
# ─── ───
protect_fields__encryption_keyfile=/etc/shinken/secrets/protected_fields_key
# ─── List of words contained in protected fields names ───
# ───
# Default : PASSWORD,PASSPHRASE,PASSE,DOMAINUSER,MSSQLUSER,MYSQLUSER,ORACLE_USER,SSH_USER,LOGIN ───
# ─── ───
protect_fields__substrings_matching_fields=PASSWORD,PASSPHRASE,PASSE,DOMAINUSER,MSSQLUSER,MYSQLUSER,ORACLE_USER,SSH_USER,LOGIN
|
Configuration interface
| Scroll Title | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||
|
Clés de chiffrement
| Scroll Title | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||
|
Authentification par SSO
| Scroll Title | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
|
Protection des données sensibles ( à ne pas modifier )
| Scroll Title | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
|
| Warning |
|---|
La définition de ces paramètres est volontairement peu détaillée, car ils sont modifiés par les commandes Shinken adéquates ( voir la page Protection des données sensibles de l'UI de Configuration ). |
Configuration interface
| Code Block | ||||
|---|---|---|---|---|
| ||||
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ─────────────────────────────────── INTERFACE CONFIGURATION PARAMETERS ──────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ────────────────────── Language ─────────────────────────────────────────────────────────────────────────────────── #
# ─── Select the lang that will be used by default on the UIs. ───
# ─── Currently managed: ───
# ───
# ... : en => (english) ───
# ... : fr => (francais) ───
# ─── ───
lang=fr
# ────────────────────── Sources ──────────────────────────────────────────────────────────────────────────────────── #
# ─── On source page, some errors or warnings may concern many elements. ───
# ─── A summary is shown for this error and you can set the number ───
# ─── of message who are in this summary. ───
# ─── ───
number_of_message_in_source_summary=5
# ────────────────── Production page ──────────────────────────────────────────────────────────────────────────────── #
# ─── Timeout for the Arbiter to load a new configuration ───
# ─── ───
# synchronizer__production__apply_new_configuration_timeout=30 |
Langue
| Scroll Title | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
Sources
| Scroll Title | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
Page production
| Scroll Title | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
Paramètre d'utilisateurs ( à
| Info |
|---|
Si votre base de données n'est pas hébergée sur le même serveur que le Synchronizer, il est préférable d'utiliser le tunnel SSH afin de ne pas exposer le port de la base de données sur le serveur distant. |
Protection des données sensibles ( paramètres à ne pas modifier )
| Warning |
|---|
La modification manuelle de ces paramètres peut entraîner une corruption de la base de données. Afin de configurer la protection des données sensibles, veuillez vous référer à la page suivante et ses sous-sections : Protection des données sensibles de l'UI de Configuration |
| Code Block | ||||
|---|---|---|---|---|
| ||||
#==================================================================================
#=============== Protected fields security ====================
# Encryption for protected fields
protect_fields__activate_encryption=0
# File containing the encryption key
protect_fields__encryption_keyfile=/etc/shinken/secrets/protected_fields_key
# List of words contained in protected fields names
# Default values : PASSWORD,PASSPHRASE,PASSE,DOMAINUSER,MSSQLUSER,MYSQLUSER,ORACLE_USER,SSH_USER,LOGIN
protect_fields__substrings_matching_fields=PASSWORD,PASSPHRASE,PASSE,DOMAINUSER,MSSQLUSER,MYSQLUSER,ORACLE_USER,SSH_USER,LOGIN
#==================================================================================
|
Les paramètres sont les suivants :
| Warning |
|---|
La définition de ces paramètres est volontairement peu détaillée, car ils sont modifiés par les commandes Shinken adéquates. Ces commandes sont expliquées dans la page indiquée dans l'avertissement précédent. |
ne pas modifier )
| Warning |
|---|
Les paramètres suivants sont gérés par Shinken. Ils peuvent être modifiés par les commandes Shinken ou par l'installeur. Il est conseillé de ne pas modifier les valeurs. Pour modifier des paramètres, il est préférable d'utiliser la section dédiée à cela : Synchronizer - Surcharge des paramètres du démon. |
Les paramètres suivants permettent au Synchronizer de connaître les dossiers dans lesquelles seront placés les fichiers de configurations (modules, démons, packs, données globales, fichier de surcharge)
Les paramètres sont modifiables ( voir la page Surcharge des paramètres du démon ( synchronizer_cfg_overload.cfg ) ). |
| Code Block | ||||
|---|---|---|---|---|
| ||||
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ────────────────────────────────── FOLDER CONFIGURATION ( DON'T MODIFY ) ────────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── When you need to customise element (host, check, ...) default properties value, set it in this directory ───
# ─── ───
cfg_dir=/etc/shinken-user/configuration/monitoring_policy
# ─── For custom global DATA ───
# ─── ───
cfg_dir=/etc/shinken-user/configuration/global-data
# ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ────────────────────────────── EXTENDED FILE CONFIGURATION ( DON'T MODIFY ) ─────────────────────────────── │ #
# └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ #
# ─── When you need to customise a value for the Synchronizer, set it in this file ───
# ─── ───
cfg_file | ||||
| Code Block | ||||
| ||||
#================================================================================== #======== Modules and architecture ========= # sub directories to load. do not edit cfg_dir=modules cfg_dir=arbiters cfg_dir=schedulers cfg_dir=pollers cfg_dir=reactionners cfg_dir=brokers cfg_dir=receivers cfg_dir=realms cfg_dir=synchronizers cfg_dir=sources cfg_dir=listeners cfg_dir=analyzers cfg_dir=taggers cfg_dir=discovery_rules cfg_file=synchronizer_discovery.cfg packs_dir=packs #================================================================================== [...] #================================================================================== #======== Global DATA and default properties ========= # You will find global DATA into this directory cfg_dir=resource.d # Load default properties for types (like hosts). Do not edit theses files, they are overwritten at every update. cfg_dir=_default/default_element_properties #================================================================================== [...] #================================================================================== #======== User parameters customizations ========= # If you need to customise a value in this file, set it in this file cfg_file=/etc/shinken-user/configuration/daemons/synchronizers/synchronizer_cfg_overload.cfg # If you need to customise element (host, check, ...) default properties value, set it in this directory cfg_dir=/etc/shinken-user/configuration/daemons/synchronizers/defaultsynchronizer_element_properties # For your custom global DTA cfg_dir=/etc/shinken-user/configuration/global-data #================================================================================== cfg_overload.cfg |
| Excerpt | |||||||
|---|---|---|---|---|---|---|---|
| |||||||
|