Lorsqu'un changement est détecté sur une des vues suivante :
Il est possible selon votre configuration que la page joue une notification sonore.
Cette page décrit comment changer le son joué par cette notification.
Pour chaque machines possédant un ou plusieurs Brokers avec des Interfaces de Visualisation il faut :
Redémarrer les Brokers avec les modules WebUI afin que le nouveau son soit pris en compte.
Voici l'aide de la commande :
$ shinken-manage-notification-sound --help
Usages
======
shinken-manage-notification-sound [--debug] -d path_to_sound_file
shinken-manage-notification-sound [--debug] -i
shinken-manage-notification-sound [--debug] -r
shinken-manage-notification-sound --help
This tool allows the Shinken administrator to override the notification sound of the Visualisation Interfaces on an environment with an enabled Broker
Options
=======
--help, -h show this help message and exit
--deploy=SOUND_TO_DEPLOY, -d SOUND_TO_DEPLOY
Deploy the sound on the Visualisation Interface
--info, -i Show information of sound used by Visualisation Interface
--reset, -r Reset and use the sound provided by Shinken.
--debug Display debug logs during the execution of the command |
Les différentes options possibles :
| Option courte | Option | Description |
|---|---|---|
| -d path_of_sound | --deploy=path_of_sound | Modifie le son actuellement utilisé par l'Interface de Visualisation par le son donné en paramètre de cette option |
| -i | --info | Affiche les informations du son actuellement utilisé par l'Interface de Visualisation |
| -r | --reset | Réinitialise le son actuellement utilisé par l'Interface de Visualisation pour utiliser le son fournit par Shinken |
| --debug | Affiche les logs de DEBUG durant l'exécution de la commande |
Les options "-d path_of_sound ou --deploy=path_of_sound", "-i ou --info" et "-r ou --reset" ne peuvent pas être utilisé en même temps. Si c'est le cas, une erreur sera remontée.
|
Cette commande n'est utilisable que sur les machines possédant au moins un Broker. S'il n'y a aucun Broker sur l'environnement actuel, une erreur sera remontée.
|
Lors de l'installation ou la mise à jour de Shinken la commande est copié dans le dossier "/usr/sbin" et peut donc être utilisée depuis n'importe quel endroit sans préciser son chemin. |
Il est possible de surcharger le son de notification actuellement utilisé dans l'Interface de Visualisation en utilisant l'option "-d [path_of_sound] ou --deploy=[path_of_sound]" où "path_of_sound" correspond au chemin de votre son sur votre serveur.
Le fichier de son sera alors copié dans le dossier " /etc/shinken-user/resources/daemons/brokers/modules/webui/notifications/sounds/".
Il vous faudra ensuite redémarrer vos Brokers et attendre le redémarrage de vos modules WebUI afin que le nouveau son soit utilisé. |
$ shinken-manage-notification-sound -d son_de_cloche.mp3 The file [ son_de_cloche.mp3 ] has been correctly deployed in /etc/shinken-user/resources/daemons/brokers/modules/webui/notifications/sounds/. =================================================== IMPORTANT =================================================== Sound file has been installed. Restart your Broker and wait for its WebUI module restart to complete sound setup. ================================================================================================================= |
Il est possible de réinitialiser le son joué par les notifications afin d'utiliser le son délivré par Shinken en utilisant l'option "-r ou --reset".
Il vous faudra ensuite redémarrer vos Brokers et attendre le redémarrage de vos modules WebUI afin que le nouveau son soit utilisé. |
============================================================================== IMPORTANT =============================================================================== Sound file has been reinitialized. The sound provided by Shinken is ready to be used. Restart your Broker and wait for its WebUI module restart to complete sound setup. ======================================================================================================================================================================== |
Il est possible de voir quel son est joué lors des notifications en utilisant l'option " -i ou --info ".
Cette option affichera :
Dans le cas où un nouveau fichier de son a été déployé à l'aide de la commande "shinken-manage-notification-sound" mais que votre Broker n'a pas redémarré ou que vos WebUI n'ont pas encore reçu la nouvelle configuration :
un message d'avertissement s'affiche en dessous des informations pour prévenir qu'un son attend d'être utilisé.
================================================================ IMPORTANT ================================================================ Your sound notification configuration is not up-to-date. Restart your Broker and wait for its WebUI module restart to complete sound setup. =========================================================================================================================================== |
$ shinken-manage-notification-sound -i
Notification ID [ global_sound_notification ] : Global Sound Notification
Original sound file name : son_de_cloche.mp3
Display name : Sound for all notifications
Loading date : 25 January 2023 12:22:51
Path : /etc/shinken-user/resources/daemons/brokers/modules/webui/notifications/sounds/global_sound_notification__son_de_cloche__LOAD_AT_12h22m51s_25_01_2023.mp3 |
Cas où un nouveau son est déployé
$ shinken-manage-notification-sound -i
------------------------- ACTUAL : Sound used by Visualisation Interface --------------------------
Notification ID [ global_sound_notification ] : Global Sound Notification
Original sound file name : son_de_cloche.mp3
Display name : Sound for all notifications
Loading date : 25 January 2023 12:22:51
Path : /etc/shinken-user/resources/daemons/brokers/modules/webui/notifications/sounds/global_sound_notification__son_de_cloche__LOAD_AT_12h22m51s_25_01_2023.mp3
----------------------------------------------------------------------------------------------------
-------------------- NEW : Sound that will be applied when the Broker restarts ---------------------
Notification ID [ global_sound_notification ] : Global Sound Notification
Original sound file name : klaxon.mp3
Display name : Sound for all notifications
Path : /etc/shinken-user/resources/daemons/brokers/modules/webui/notifications/sounds/global_sound_notification__klaxon.mp3
---------------------------------------------------------------------------------------------------- |
Les fichiers de son pouvant être déployés par cette commande doivent respecter les propriétés suivantes :
Si la commande n'est pas de type MP3 ( audio/mpeg ), la commande ne continuera pas et un message sera remonté.
The file [ son_de_cloche.py ] is not of type MP3 (audio/mpeg). It's type is "text/x-python". Change your file by a valid file and run this command again. |
Si le fichier fait plus de 5 Mo, la commande ne continuera pas et un message sera remonté.
The file [ sonnerie.mp3 ] is bigger than maximal size ( 5 Mo Max ). Change your file by a valid file and run this command again. |
La commande copie les fichiers de sons dans le répertoire : " /etc/shinken-user/resources/daemons/brokers/modules/webui/notifications/sounds/ ". Il peut être utile d'aller dans ce répertoire pour récupérer un son déjà déployé.
Votre support pourra aussi se servir du contenu de ce répertoire pour vérifier quel sont les sons chargés par l'Interface de Visualisation si la commande n'arrive pas à fournir ces informations.
Les fichiers de sons dans ce répertoire ont 3 formats de nommage :