À partir de la version 02.04.00 de Shinken, l'Arbiter sauvegarde, dans un fichier de rétention par royaume, les dates de première mise en supervision des éléments.
Pour les éléments créés avant, cette donnée est disponible dans le cache interne des modules SLA
Lors du premier démarrage après la mise en jour, l'Arbiter contacte les modules SLA attachés aux Brokers ( sla_writer ) pour récupérer la date de première mise en supervision des éléments.
L'Arbiter dispose alors de cette information pour tous les éléments de la configuration, permettant ainsi au module SLA de ne plus avoir à maintenir son cache interne.
Au démarrage de l'Arbiter, ce dernier établit la liste des modules SLA qui doivent être contactés, pour mettre à jour les données de configuration des éléments d'un royaume. Le log suivant permet de suivre quels royaumes doivent être mis à jour, à partir des données de quels modules SLA
[YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME] [ MONITORING START TIME COMPONENT ] Will query configuration update of elements of realm 〖 REALM_NAME 〗 from Module 〖 SLA_NAME 〗 of Broker 〖 BROKER_NAME 〗 |
[2022-06-22 11:20:48] INFO : [ arbiter-master ] [ MONITORING START TIME COMPONENT ] Will query configuration update of elements of realm 〖 All 〗 from Module 〖 sla 〗 of Broker 〖 broker-master 〗 |
Les logs suivants permettent de voir passer les échanges entre l'Arbiter et un Broker
[YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME] [ MANAGE INTER DAEMON MESSAGE ] Send 〖X〗 messages to 〖BROKER_NAME〗 in 〖XX.XXms〗 |
[YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME ] [ MANAGE INTER DAEMON MESSAGE ] Got 〖X〗 new messages from 〖BROKER_NAME〗 in 〖XX.XXms〗 |
[YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME ] [ MANAGE INTER DAEMON MESSAGE ] Message from satellites:〖X〗 processed:〖X〗 remaining:〖X〗 |
[2022-06-22 11:20:47] INFO : [ arbiter-master ] [ MANAGE INTER DAEMON MESSAGE ] Send 〖1〗 messages to 〖broker-master〗 in 〖69.38ms〗 |
[2022-06-22 11:20:48] INFO : [ arbiter-master ] [ MANAGE INTER DAEMON MESSAGE ] Got 〖1〗 new messages from 〖broker-master〗 in 〖1.48ms〗 |
[2022-06-22 11:20:48] INFO : [ arbiter-master ] [ MANAGE INTER DAEMON MESSAGE ] Message from satellites:〖1〗 processed:〖1〗 remaining:〖0〗 |
[YYYY-MM-DD HH:MM:SS] INFO: [ BROKER_NAME] [ SLA_NAME ] [ MANAGE INTER DAEMON MESSAGE ] Arbiter asks for our sla monitoring start time. Answer message built in 〖XX.XXms〗 for 〖XXX〗 items. |
[2022-06-22 11:20:48] INFO : [ broker-master ] [ sla ] [ MANAGE INTER DAEMON MESSAGE ] Arbiter asks for our sla monitoring start time. Answer message built in 〖3.47ms〗 for 〖29〗 items. |
Depuis la version 02.06.00 de Shinken, l'Arbiter gère un fichier par royaume pour enregistrer les dates de première mise en supervision des éléments.
Si des données de mise à jour ont pu être reçues de modules SLA, le fichier de sauvegarde de la rétention d'un royaume aura un nom suivant ce motif
/var/lib/shinken/arbiter-retention-HASH.jsonSinon, le nom des fichiers suivra ce motif
/var/lib/shinken/arbiter-retention-NOM_ROYAUME.jsonEntre les version 02.04.00 et 02.06.00 il n'y avait qu'un seul fichier global nommé
/var/lib/shinken/arbiter-retention.jsonil sera utilisé si aucun autre fichier de rétention n'est disponible pour un royaume donné
Si un fichier de sauvegarde de rétention avec les données des éléments créés après la version 02.04.00 de Shinken existe, il est chargé et le message suivant est affiché :
[YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME] [ MONITORING START TIME COMPONENT ] Old realm retention file 〖 /var/lib/shinken/arbiter-retention-NAME.json 〗 found, loading its data |
[2022-06-22 11:20:48] INFO : [ arbiter-master ] [ MONITORING START TIME COMPONENT ] Old realm retention file 〖 /var/lib/shinken/arbiter-retention-All.json 〗 found, loading its data |
Si un fichier de sauvegarde de rétention avec des données provenant des modules SLA existe, il est chargé.
[YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME] [ MONITORING START TIME COMPONENT ] Realm retention file 〖 /var/lib/shinken/arbiter-retention-HASH.json 〗 found, updating monitoring start times with its data |
[2022-06-22 11:20:48] INFO : [ arbiter-master ] [ MONITORING START TIME COMPONENT ] Realm retention file〖 /var/lib/shinken/arbiter-retention-a52ace420f2175d08b1577a1bea5445e36801229c074ef9ed6c55a73401fd9c2.json 〗 found, updating monitoring start times with its data |
[YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME] [ MONITORING START TIME COMPONENT ] Realm retention file 〖 /var/lib/shinken/arbiter-retention-HASH.json 〗 found, loading its data |
[2022-06-22 11:20:48] INFO : [ arbiter-master ] [ MONITORING START TIME COMPONENT ] Realm retention file〖 /var/lib/shinken/arbiter-retention-a52ace420f2175d08b1577a1bea5445e36801229c074ef9ed6c55a73401fd9c2.json 〗 found, loading its data |
Si un fichier de sauvegarde de rétention ne contient aucune donnée, il est supprimé
[YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME] [ MONITORING START TIME COMPONENT ] Removed empty retention data file 〖 FILE_NAME 〗 |
[2022-06-22 11:20:48] INFO : [ arbiter-master ] [ MONITORING START TIME COMPONENT ] Removed empty retention data file 〖 /var/lib/shinken/arbiter-retention-All.json 〗 |
Si la suppression du fichier sans donnée est impossible, le message suivant sera disponible
[YYYY-MM-DD HH:MM:SS] WARNING: [ ARBITER_NAME] [ MONITORING START TIME COMPONENT ] Remove of empty retention data file 〖 FILE_NAME 〗 returned 〖 ERR 〗 |
[2022-06-22 11:20:48] WARNING: [ arbiter-master ] [ MONITORING START TIME COMPONENT ] Remove of empty retention data file 〖 /var/lib/shinken/arbiter-retention-All.json 〗 returned 〖 Permission denied 〗 |
S'il n'existe aucun fichier de rétention disponible pour un royaume, ou qu'ils ne contiennent aucune donnée, le log suivant apparaîtra :
[YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME] [ MONITORING START TIME COMPONENT ] No retention data was available for realm 〖 NAME 〗 tried in 〖 /var/lib/shinken/arbiter-retention-HASH.json 〗, 〖 /var/lib/shinken/arbiter-retention-NAME.json 〗, 〖 /var/lib/shinken/arbiter-retention.json 〗 |
[2022-06-22 11:20:48] INFO : [ arbiter-master ] [ MONITORING START TIME COMPONENT ] No retention data was available for realm 〖 All〗 tried in 〖 /var/lib/shinken/arbiter-retention-a52ace420f2175d08b1577a1bea5445e36801229c074ef9ed6c55a73401fd9c2.json 〗, 〖 /var/lib/shinken/arbiter-retention-All.json 〗, 〖 /var/lib/shinken/arbiter-retention.json 〗 |
Suite à la réception des dates de mise en supervision des modules SLA, le fichier de sauvegarde de rétention est mis à jour :
[YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME] [ MONITORING START TIME COMPONENT ] Saved retention data file〖 /var/lib/shinken/arbiter-retention-HASH.json 〗 successfully [YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME] [ MONITORING START TIME COMPONENT ] Updated retention data of XX elements for realm 〖 REALM_NAME 〗 from Module 〖 SLA_NAME 〗 of Broker 〖 BROKER_NAME 〗 |
[2022-06-22 11:20:48] INFO : [ arbiter-master ] [ MONITORING START TIME COMPONENT ] Saved retention data file〖 /var/lib/shinken/arbiter-retention-a52ace420f2175d08b1577a1bea5445e36801229c074ef9ed6c55a73401fd9c2.json 〗 successfully [2022-06-22 11:20:48] INFO : [ arbiter-master ] [ MONITORING START TIME COMPONENT ] Updated retention data of 28 elements for realm 〖 All 〗 from Module 〖 sla 〗 of Broker 〖 broker-master 〗 |
Suite à la création du fichier de rétention avec les données de mise en supervision récupérée des modules SLA, le fichier sans les information des modules SLA est supprimé :
[YYYY-MM-DD HH:MM:SS] INFO: [ ARBITER_NAME] [ MONITORING START TIME COMPONENT ] Removed obsolete retention data file 〖 /var/lib/shinken/arbiter-retention-NAME.json 〗 |
[2022-06-22 11:20:48] INFO : [ arbiter-master ] [ MONITORING START TIME COMPONENT ] Removed obsolete retention data file 〖 /var/lib/shinken/arbiter-retention-All.json 〗 |
Si les droits d'accès au fichier à supprimer sont insuffisants, le log suivant sera généré :
[YYYY-MM-DD HH:MM:SS] WARNING: [ ARBITER_NAME] [ MONITORING START TIME COMPONENT ] Remove of obsolete retention data file 〖 /var/lib/shinken/arbiter-retention-NAME.json 〗 canceled due to wrong access rights |
[2022-06-22 11:20:48] WARNING: [ arbiter-master ] [ MONITORING START TIME COMPONENT ] Remove of obsolete retention data file 〖 /var/lib/shinken/arbiter-retention-All.json 〗 canceled due to wrong access rights |