Les fichiers de log du Synchronizer sont situés dans le dossier /var/log/shinken/ ( voir la page Fichiers Logs ).
Au démarrage et tous les jours à minuit, ce log indique la version ainsi que le numéro de patch cumulatif du démon.
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] Daemon version is: XX.XX.XX-release.fr culmulative-patch-YY |
Lors du démarrage du démon, une ligne est disponible:
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [START-DAEMON] The daemon (version=02.08.01-release.fr) is now started as a daemon (detached from any shell) with pid=15412 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ SYSTEM ] System resource number of open files is set to (soft:1024 / hard:1024 ) (from parameter max_file_descriptor_limit) [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ SYSTEM ] System resource number of processes/threads is set to (soft:unlimited / hard:unlimited ) (set at system max values) |
Avec comme informations principales:
Au démarrage du Synchronizer, celui-ci va se connecter à la base Mongo. Des logs d'initialisation sont disponibles pour résumer les paramètres utilisés pour la connexion
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] Creating connection to database [synchronizer], requested by [ Synchronizer ] [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] MongoDB parameters [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] - synchronizer__database__name ————————————————————————————————————————————————— :〖 synchronizer 〗 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] - synchronizer__database__uri —————————————————————————————————————————————————— :〖 mongodb://localhost/?safe=false 〗 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] - synchronizer__database__replica_set —————————————————————————————————————————— :〖 〗 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] - synchronizer__use_ssh_tunnel ————————————————————————————————————————————————— :〖 0 〗 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] - synchronizer__use_ssh_retry_failure —————————————————————————————————————————— :〖 1 〗 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] - synchronizer__ssh_user ——————————————————————————————————————————————————————— :〖 shinken 〗 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] - synchronizer__ssh_keyfile ———————————————————————————————————————————————————— :〖 ~shinken/.ssh/id_rsa 〗 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] - synchronizer__ssh_tunnel_timeout ————————————————————————————————————————————— :〖 120 〗 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] AutoReconnect Management [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] - synchronizer__database__retry_connection_X_times_before_considering_an_error — :〖 15 〗 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] - synchronizer__database__wait_X_seconds_before_reconnect —————————————————————— :〖 5 〗 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] Try to open a Mongodb connection to mongodb://localhost/?safe=false:synchronizer [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] Mongo connection established in 4.28ms |
Dans certains cas, par exemple quand on duplique un processus, il faut recréer la connexion à Mongo afin d'éviter d'avoir deux connexions identiques sur deux processus différents. Ce log apparaît :
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] Resetting connection to database [synchronizer], requested by [ Synchronizer ] [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] Try to open a Mongodb connection to mongodb://localhost/?safe=false:synchronizer [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ INITIALISATION ] [ MONGO ] Mongo connection established in 4.09ms |
Ce chapitre décrit les logs affichés par le Synchronizer lorsqu'un administrateur Shinken accède à la page de mise en production sur l'interface de configuration ( voir la page Page de mise en production ).
Ces logs s'affichent lorsqu'on arrive sur la page Production ou qu'une action est effectuée sur cette page ( Vérification de la configuration, Application de la configuration… )
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] Arbiter master >arbiter-master< is available |
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] Arbiter master >arbiter-master< is not available (Is reloading). |
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] Arbiter master >arbiter-master< is not available (Is not reloading). |
Ce log s'affiche quand un administrateur Shinken demande une vérification d'une configuration à mettre en production.
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] User >USER_NAME< (id:USER_UUID) is asking to check a new configuration (check_id:CHECK_ID) |
Ce log s'affiche quand l'Arbiter commence la vérification d'une configuration à mettre en production envoyé précédemment.
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] Arbiter master start to check a new configuration (check_id:CHECK_ID) |
Ce log s'affiche quand l'Arbiter a terminé la vérification d'une configuration à mettre en production envoyé précédemment.
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] Arbiter master check done (check_id:CHECK_ID) |
Ce log s'affiche quand un administrateur Shinken demande une mise en production.
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] User >USER_NAME< (id:USER_UUID) is asking to apply a new configuration (reload_id:RELOAD_ID) |
Ce log s'affiche quand l'Arbiter commence la mise en production.
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] Arbiter master start to apply a new configuration (reload_id:RELOAD_ID) |
Ce log s'affiche quand l'Arbiter a terminé la mise en production.
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] Arbiter master apply done (reload_id:RELOAD_ID) |
Ce log s'affiche quand l'Arbiter n'est pas disponible pour être redémarré lors de la mise en production
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] Cannot apply new configuration because Arbiter master >arbiter-master< is not reachable (Is reloading). |
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] Cannot apply new configuration because Arbiter master >arbiter-master< is not reachable (Is not reloading). |
Ce log d'erreur indique qu'un fichier des modules de Shinken situé dans /etc/shinken n'est pas encodé en utf-8, il est suivi d'un log d’avertissement ( warning ) indiquant le fichier en question dans l'exemple suivant, c'est le fichier /etc/shinken/modules/webui.cfg qui ne respecte pas le bon encodage.
[YYYY-MM-DD HH:MM:SS] WARNING: [ synchronizer-name ] [config] Some characters could not be read in utf-8 in the file : /etc/shinken-user/source-data/ma-source/items/elements.cfg |
Pour résoudre ce problème, il suffit de réencoder le fichier au format UTF-8.
Il ne peut y avoir qu'une seule source de type "syncui-import". Une source nommée "syncui" étant déjà définie en interne, ajouter une source de type "syncui-import" appelée autrement que "syncui" ( pour surcharger la source syncui ) va empêcher le synchronizer de démarrer et remontera le log suivant :
[YYYY-MM-DD HH:MM:SS] ERROR : [ synchronizer-name ] [ CONFIGURATION ] You can have only one source of type "syncui-import" and it must be named "syncui". All the following files defines source of type "syncui-import" ([/etc/shinken/sources/first-syncui.cfg], [/etc/shinken/sources/second-syncui.cfg]). |
Il ne peut y avoir qu'une seule source de type "discovery-import". Une source nommée "discovery" étant déjà définie en interne, ajouter une source de type "discovery-import" appelée autrement que "discovery" ( pour surcharger la source discovery ), déclaré dans les sources du synchronizer, va empêcher le synchronizer de démarrer et remontera le log suivant :
[YYYY-MM-DD HH:MM:SS] ERROR : [ synchronizer-name ] [ CONFIGURATION ] You can have only one source of type "discovery-import" and it must be named "discovery" |
Si dans son fichier de configuration une source n'a pas de paramètre "module_type", le Synchronizer ne démarre pas et ce log est affiché.
[YYYY-MM-DD HH:MM:SS] ERROR : [ synchronizer-name ] [ CONFIGURATION ] The source imported from file "CONFIGURATION_FILE_PATH" does not have a "module_type" |
Lorsque le nom d'un royaume contient un ( ou plusieurs ) caractère( s ) interdits, deux logs annoncent quels sont ces caractères ( ", ', < et > ), le nom du royaume en erreur ainsi que le fichier et la ligne dont il vient.
[YYYY-MM-DD HH:MM:SS] ERROR : [ synchronizer-name ] Forbidden characters ", ', < or > found in the name of realm "<France>" for "/etc/shinken/realms/france.cfg:7 [YYYY-MM-DD HH:MM:SS] ERROR : [ synchronizer-name ] Items in <France> is incorrect |
Dans l'exemple, le royaume présent dans le fichier /etc/shinken/realms/france.cfg possède le nom <france> qui contient des caractères interdits. ( < et > ).
Le Synchronizer a besoin de la connexion à MongoDB pour pouvoir démarrer. Si la connexion ne peut être établie, le log suivant sera présent dans le fichier /tmp/bad_start_for_synchronizer_instance_0 :
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ MONGO ] Mongo raised ( Mongo connection failure to mongodb://192.168.1.202/?safe=false ) on the operation get_connection. Operation failed : 1/5 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ MONGO ] Mongo raised ( Mongo connection failure to mongodb://192.168.1.202/?safe=false ) on the operation get_connection. Operation failed : 2/5 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ MONGO ] Mongo raised ( Mongo connection failure to mongodb://192.168.1.202/?safe=false ) on the operation get_connection. Operation failed : 3/5 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ MONGO ] Mongo raised ( Mongo connection failure to mongodb://192.168.1.202/?safe=false ) on the operation get_connection. Operation failed : 4/5 [YYYY-MM-DD HH:MM:SS] ERROR :[ synchronizer-name ] [ MONGO ] Mongo raised ( Mongo connection failure to mongodb://192.168.1.202/?safe=false ) on the operation get_connection. Operation failed : 5/5. We tried 5 times but it kept failing. [YYYY-MM-DD HH:MM:SS] ERROR :[ synchronizer-name ] The daemon must have access to mongoDb to start but it's unreachable, bail out [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] Stopping synchronizer daemon |
Lorsqu'on essaye de lancer une requête vers mongo, il peut arriver que ces requêtes échouent. On log alors ces erreurs en INFO jusqu'à atteindre le nombre d'essai maximum déterminé dans la configuration. Après ça, le log passe en ERROR et le Synchronizer s'éteint.
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ MONGO ] Mongo raised ( [Errno 111] Connection refused ) on the operation remove on last_synchronizations. Operation failed : 1/5 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ MONGO ] Mongo raised ( [Errno 111] Connection refused ) on the operation remove on last_synchronizations. Operation failed : 2/5 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ MONGO ] Mongo raised ( [Errno 111] Connection refused ) on the operation remove on last_synchronizations. Operation failed : 3/5 [YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ MONGO ] Mongo raised ( [Errno 111] Connection refused ) on the operation remove on last_synchronizations. Operation failed : 4/5 [YYYY-MM-DD HH:MM:SS] ERROR : [ synchronizer-name ] [ MONGO ] Mongo raised ( [Errno 111] Connection refused ) on the operation remove on last_synchronizations. Operation failed : 5/5. We tried 5 times but it kept failing. |
Lors des tentatives:
[YYYY-MM-DD HH:MM:SS] WARNING: [ synchronizer-name ] [ ARBITER GET CONFIGURATION ] Arbiter asks me for the configuration but the Synchronizer is not ready for the moment after 55 attempts. Max attempts before Arbiter give up: 90 |
Si toutes les tentatives ont échoué:
[YYYY-MM-DD HH:MM:SS] ERROR: [ synchronizer-name ] [ ARBITER GET CONFIGURATION ] Arbiter asks me for the configuration but the Synchronizer is not ready, Arbiter will stop to ask us a configuration. You will need to restart manually your Arbiter when Synchronizer is ready. (attempt 60) |
[YYYY-MM-DD HH:MM:SS] ERROR: [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] INTERNAL PROBLEM : The request for check result is malformed. The arbiter_check_id parameter is missing. Please contact your support. |
[YYYY-MM-DD HH:MM:SS] ERROR: [ synchronizer-name ] [ APPLY NEW CONFIGURATION ] INTERNAL PROBLEM : The request for restart result is malformed. The arbiter_reload_id parameter is missing. Please contact your support. |
Si le serveur hébergeant le démon est surchargé en termes d'IO disques sur le volume qui héberge le fichier de log, alors ce dernier va mettre du temps à s'écrire et va ralentir tout le démon. Il faut alors si c'est faisable isoler le volume des disques sur un disque moins chargé pour ne pas ralentir le démon.
En cas de soucis, les logs suivants seront présents :
[YYYY-MM-DD HH:MM:SS] WARNING : [ LOGGER ] [YYYY-MM-DD HH:MM:SS] WARNING : [ LOGGER ] ---------------------------------------------------------------------------------------------------- [YYYY-MM-DD HH:MM:SS] WARNING : [ LOGGER ] [ WRITING ] The log writes time is very high (1.87s). Please look at your log disk performance. [YYYY-MM-DD HH:MM:SS] WARNING : [ LOGGER ] ---------------------------------------------------------------------------------------------------- [YYYY-MM-DD HH:MM:SS] WARNING : [ LOGGER ] |
Les démons ont une phase de chargement des modules( voir la page GLOBAL - Les logs de gestion des modules - chapitre [ MODULES-MANAGER ] ).
Au démarrage du démon Synchronizer, les sources définies dans son fichier cfg "synchronizer.cfg" sont initialisées.
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ source:SOURCE_NAME ] Configuration of the source [SOURCE_NAME] initialized |
[YYYY-MM-DD HH:MM:SS] INFO : [ synchronizer-name ] [ SOURCE ] [ MERGE ] Start comparing 6 merge items to existing items |