Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Scroll Ignore
scroll-pdftrue
scroll-officetrue
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmltrue
Panel
titleSommaire

Table of Contents
stylenone

Introduction

Lors qu'un changement est détecté sur une des vues suivante :

  • Les listes ( Tous les éléments et Problèmes sources )
  • La liste des événements
  • Les portails
  • La météo des services

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.

Comment modifier le son des notifications

Pour chaque machines possédant un ou plusieurs Brokers avec des Interfaces de Visualisation il faut :

  1. Se mettre dans un répertoire de travail ( à votre convenance ) 
  2. Copier le son dans ce répertoire de travail
  3. Utiliser la commande "shinken-manage-notification-sound" dans ce répertoire de travail


Redémarrer les Brokers avec les modules WebUI afin que le nouveau son soit pris en compte.

La commande "shinken-manage-notification-sound"

Présentation

Voici l'aide de la commande :

Code Block
themeEmacs
$ 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 courteOptionDescription
-d path_of_sound--deploy=path_of_soundModifie le son actuellement utilisé par l'Interface de Visualisation par le son donné en paramètre de cette option
-i--infoAffiche les informations du son actuellement utilisé par l'Interface de Visualisation
-r--resetRéinitialise le son actuellement utilisé par l'Interface de Visualisation pour utiliser le son fournit par Shinken

--debugAffiche les logs de DEBUG durant l'exécution de la commande
Warning

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.

Code Block
You cannot use several parameters at the same time
Warning

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.

Code Block
languageyml
There is no Broker enabled in this environment
Info

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.

Utilisation de la commande

Modification du son

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/".

Warning

Il vous faudra ensuite redémarrer vos Brokers et attendre le redémarrage de vos modules WebUI afin que le nouveau son soit utilisé.

Exemple d'utilisation
Code Block
themeEmacs
$ 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.
=================================================================================================================

Réinitialisation du son afin d'utiliser le son délivré par Shinken

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".


Warning

Il vous faudra ensuite redémarrer vos Brokers et attendre le redémarrage de vos modules WebUI afin que le nouveau son soit utilisé.

Code Block
============================================================================== 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.
========================================================================================================================================================================

Affichage du son actuellement utilisé par l'Interface de Visualisation

Il est possible de voir quel son est joué lors des notifications en utilisant l'option " -i ou --info ".

Cette option affichera :

  • Notification ID : Identifiant indiquant où va être utilisé le son dans l'application. ( Le seul identifiant valide actuellement est global_sound_notification ).
  • Original sound file name : Nom que le fichier avait lors du changement de son.
  • Display name : Nom d'affichage du son. ( Non utilisé actuellement )
  • Loading date : Date où le son a été pris en compte par l'Interface de Visualisation
  • Path : Chemin du son dans le répertoire utilisateur


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 non pas encore reçu la nouvelle configuration :

  • Les informations sur le nouveau son sont affichées en plus des informations sur le son actuellement utilisé par l'Interface de Visualisation
  • un message d'avertissement s'affiche en dessous des informations pour prévenir qu'un son attend d'être utilisé.

    Code Block
    ================================================================ IMPORTANT ================================================================
    Your sound notification configuration is not up-to-date. Restart your Broker and wait for its WebUI module restart to complete sound setup.
    ===========================================================================================================================================
Exemple d'utilisation
Code Block
themeEmacs
$ 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é

Code Block
$ 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
----------------------------------------------------------------------------------------------------


Définition d'un fichier de son valide

Les fichiers de son pouvant être déployés par cette commande doivent respecter les propriétés suivantes : 

  • Le type de ce fichier doit correspondre au type MP3.
  • La taille de votre fichier ne doit pas excéder 5 Mo.

Si la commande n'est pas de type MP3 ( audio/mpeg ), la commande ne continuera pas et un message sera remonté.

Code Block
languageyml
The file [ son_de_cloche.py ] is not of type MP3 (audio/mpeg). His 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é.


Code Block
languageyml
The file [ sonnerie.mp3 ] is bigger than maximal size ( 5 Mo Max ). Change your file by a valid file and run this command again.

Lister les fichiers de son déployer par la commande

La commande copie les fichier de sons dans le répertoire : " /etc/shinken-user/resources/daemons/brokers/modules/webui/notifications/sounds/ ". Il peut etre utile d'allez dans ce repertoire pour recupere un son deja déployer.

Votre support poura aussi se servire du contenue de ce repretoire pour vérifier quel sont les sons chargé par l'Interface de Visualisation si la commande n'arrive pas à fournire ces informations.

Les fichier de sons dans ce repertoire ont 3 formats de nommage : 

  • Avec le suffix LOAD_AT_[heure et date] : Le fichier est chargé dans les WebUI à l'heure et date.
  • Avec le suffix disabled : Le fichier à été déchargé des WebUI.
  • Sans suffix : Le fichier à été copier mais pas encore chargé par les WebUI