Présentation

Le format et l'apparence des widget peuvent être prédéfinis pour l'ensemble de vos météos ( voir la page Concept et paramétrage de la grille - Edition - Météo ).

Cette partie permet de définir les valeurs utilisées quand un champ de configuration n'est pas défini ( voir le chapitre Concept et paramétrage des widgets - Edition - Météo ).

Configuration

La configuration de la disposition par défaut des widgets se trouve par défaut dans le fichier :

  • /etc/shinken-user/configuration/daemons/brokers/modules/webui/modules/webui_module_service_weather/webui_module_service_weather__default_widgets_layout.cfg

Vous trouverez aussi un exemple de configuration dans :

  • /etc/shinken-user-example/configuration/daemons/brokers/modules/webui/modules/webui_module_service_weather/webui_module_service_weather__default_widgets_layout.cfg

Exemple de fichier de configuration

# ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ────────────────────────────────── DEFAULT WIDGETS LAYOUT ─────────────────────────────────── │ #
# └─────────────────────────────────────────────────────────────────────────────────────────────────────┘ #

# ─────────── default weather widget layout ─────────────────────────────────────────────────────────── #

# ─── NOTE: Change these parameters to customize the default weather widget layout ───

# ─── This option selects what name will be used in weather widget layout. ───
# ─── Possible values are : ───
# ───
# ... : definition_name ( Will use the field "host_name" for host and cluster ───
# and "service_description" for check ) ───
# Default : visualisation_name ( Will use the field visualisation_name ───
# for host, cluster and check ) ───
# ───
# broker__module_webui__module_service_weather__default_weather_widget_layout__name visualisation_name

# ─── This option allows you to select which of the context or status ───
# ─── will be the large icon and the small icon by default. ───
# ─── The from_webui value will use the value from WebUI, with the parameter : tiles_background ───
# ─── Mapping of the tiles_background values will be : ───
# ─── -> context : context_then_status ───
# ─── -> context_and_status : context_and_status ───
# ─── -> status : only_status ───
# ─── Possible values are : ───
# ───
# Default : from_webui ( Use the WebUI configuration. ) ───
# ... : context_then_status ( context on big icon, status on small icon. ) ───
# ... : status_then_context ( status on big icon, context on small icon. ) ───
# ... : only_status ( status on big icon, context is not display. ) ───
# ───
# broker__module_webui__module_service_weather__default_weather_widget_layout__state_icon from_webui

# ─── This option allows you to select how the background is made. ───
# ─── The from_webui value will use the value from WebUI, with the parameter : tiles_background ───
# ─── Mapping of the tiles_background values will be : ───
# ─── -> context : context_then_status ───
# ─── -> context_and_status : context_and_status ───
# ─── -> status : only_status ───
# ─── Possible values are : ───
# ───
# Default : from_webui ( Use the WebUI configuration. ) ───
# ... : context_then_status ( Will use the context to select the color. ───
# If there are no context, status will be use. ) ───
# ... : context_and_status ( Will use the context and the status to select the color. ) ───
# ... : only_status ( Will use the only status to select the color. ) ───
# ... : no_background ( The background will be blank. ) ───
# ───
# broker__module_webui__module_service_weather__default_weather_widget_layout__background from_webui

# ─── This option allows you to choose if the sla info will be displayed on the weather widget. ───
# ─── Deactivate SLA info will free MongoDB resources. ───
# ───
# ... : 0 => Disable ( Disable display SLA info ) ───
# Default : 1 => Enable ( Display SLA info ) ───
# ───
# broker__module_webui__module_service_weather__default_weather_widget_layout__sla 1

# ─── This option allows you to choose the default size the weather widget. ───
# ─── Format is WIDTH,HEIGHT. Size is in number of case. ───
# ─── Value "all" in width makes the widget take all the width. ───
# ───
# Default : 15,4 ( width:15 height:4 ) ───
# ───
# broker__module_webui__module_service_weather__default_weather_widget_layout__size 15,4

# ────────── default separator widget layout ────────────────────────────────────────────────────────── #

# ─── This option allows you to choose the default color of the text in separator widget. ───
# ─── The value format is a web colors ( css color ) see https://en.wikipedia.org/wiki/Web_colors ───
# ───
# Default : #000000 ( black ) ───
# ───
# broker__module_webui__module_service_weather__default_separator_widget_layout__text_color #000000

# ─── This option allows you to choose the default size the separator widget. ───
# ─── Format is WIDTH,HEIGHT. Size is in number of case. ───
# ─── Value "all" in width makes the widget take all the width. ───
# ───
# Default : all,2 ( width:all height:2 ) ───
# ───
# broker__module_webui__module_service_weather__default_separator_widget_layout__size all,2

# ─── This option allows you to choose the percent of where text zone starts. ───
# ─── Format is in percent of the width of the widget. ───
# ───
# Default : 10 ( The text zone starts at 10 percent of the width ) ───
# ───
# broker__module_webui__module_service_weather__default_separator_widget_layout__start_zone_text_percent 10

# ─── This option allows you to choose the percent of where text zone ends. ───
# ─── Format is in percent of the width of the widget. ───
# ───
# Default : 10 ( The text zone ends at 10 percent of the width ) ───
# ───
# broker__module_webui__module_service_weather__default_separator_widget_layout__end_zone_text_percent 10

# ─── This option allows you to choose the text position in the zone text define upper. ───
# ───
# Default : center ( text will be centred ) ───
# ... : left ( text will be align on the left ) ───
# ... : right ( text will be align on the right ) ───
# ───
# broker__module_webui__module_service_weather__default_separator_widget_layout__text_align center

# ──────────── default title widget layout ──────────────────────────────────────────────────────────── #

# ─── This option allows you to choose the default color of the text in title widget. ───
# ─── The value format is a web colors ( css color ) see https://en.wikipedia.org/wiki/Web_colors ───
# ───
# Default : #000000 ( black ) ───
# ───
# broker__module_webui__module_service_weather__default_title_widget_layout__text_color #000000

# ─── This option allows you to choose the default size the title widget. ───
# ─── Format is WIDTH,HEIGHT. Size is in number of case. ───
# ─── Value "all" in width makes the widget take all the width. ───
# ───
# Default : all,3 ( width:all height:3 ) ───
# ───
# broker__module_webui__module_service_weather__default_title_widget_layout__size all,3


La configuration décrite ci-dessous n'est que la configuration par défaut il est tout à fait possible de modifier la disposition des widgets pour chaque météo.

Détails des sections composant le fichier de configuration


Disposition par défaut des widgets titre

# ────────────  default title widget layout  ──────────────────────────────────────────────────────────── #

# ─── This option allows you to choose the default color of the text in title widget. ───
# ─── The value format is a web colors ( css color ) see https://en.wikipedia.org/wiki/Web_colors ───
# ───
# Default : #000000 ( black ) ───
# ───
# broker__module_webui__module_service_weather__default_title_widget_layout__text_color #000000

# ─── This option allows you to choose the default size the title widget. ───
# ─── Format is WIDTH,HEIGHT. Size is in number of case. ───
# ─── Value "all" in width makes the widget take all the width. ───
# ───
# Default : all,3 ( width:all height:3 ) ───
# ───
# broker__module_webui__module_service_weather__default_title_widget_layout__size all,3


Nom

Type

Unité

Défaut

Commentaire


broker__module_webui__module_service_weather__default_title_widget_layout__text_color


Texte

---

#000000

Cette option vous permet de choisir la couleur par défaut du texte dans le widget titre.

Le format de la valeur est une couleur web ( Voir : https://en.wikipedia.org/wiki/Web_colors )


broker__module_webui__module_service_weather__default_title_widget_layout__size


Size---all,3

Cette option vous permet de choisir la taille par défaut du widget titre. 
Le format est LARGEUR,HAUTEUR.

La taille est en nombre de cases.
La valeur "all" en largeur fait que le widget prend toute la largeur.  

Disposition par défaut des widgets séparateur

# ──────────  default separator widget layout  ────────────────────────────────────────────────────────── #

# ─── This option allows you to choose the default color of the text in separator widget. ───
# ─── The value format is a web colors ( css color ) see https://en.wikipedia.org/wiki/Web_colors ───
# ───
# Default : #000000 ( black ) ───
# ───
# broker__module_webui__module_service_weather__default_separator_widget_layout__text_color #000000

# ─── This option allows you to choose the default size the separator widget. ───
# ─── Format is WIDTH,HEIGHT. Size is in number of case. ───
# ─── Value "all" in width makes the widget take all the width. ───
# ───
# Default : all,2 ( width:all height:2 ) ───
# ───
# broker__module_webui__module_service_weather__default_separator_widget_layout__size all,2

# ─── This option allows you to choose the percent of where text zone starts. ───
# ─── Format is in percent of the width of the widget. ───
# ───
# Default : 10 ( The text zone starts at 10 percent of the width ) ───
# ───
# broker__module_webui__module_service_weather__default_separator_widget_layout__start_zone_text_percent 10

# ─── This option allows you to choose the percent of where text zone ends. ───
# ─── Format is in percent of the width of the widget. ───
# ───
# Default : 10 ( The text zone ends at 10 percent of the width ) ───
# ───
# broker__module_webui__module_service_weather__default_separator_widget_layout__end_zone_text_percent 10

# ─── This option allows you to choose the text position in the zone text define upper. ───
# ───
# Default : center ( text will be centred ) ───
# ... : left ( text will be align on the left ) ───
# ... : right ( text will be align on the right ) ───
# ───
# broker__module_webui__module_service_weather__default_separator_widget_layout__text_align center


Nom

Type

Unité

Défaut

Commentaire


broker__module_webui__module_service_weather__default_separator_widget_layout__text_color


Texte

---

#000000

Cette option vous permet de choisir la couleur par défaut du texte dans le widget séparateur.

Le format de la valeur est une couleur web ( Voir : https://en.wikipedia.org/wiki/Web_colors )



broker__module_webui__module_service_weather__default_separator_widget_layout__size


Size---all,2

Cette option vous permet de choisir la taille par défaut du widget séparateur. 
Le format est LARGEUR,HAUTEUR.

La taille est en nombre de cases.
La valeur "all" en largeur fait que le widget prend toute la largeur.



broker__module_webui__module_service_weather__default_separator_widget_layout__start_zone_text_percent


Size%10

Cette option vous permet de choisir le pourcentage d’où commence la zone de texte.



broker__module_webui__module_service_weather__default_separator_widget_layout__end_zone_text_percent


Size%10

Cette option vous permet de choisir le pourcentage de l’endroit où se termine la zone de texte.



broker__module_webui__module_service_weather__default_separator_widget_layout__text_align


------center

Cette option vous permet de choisir la position du texte dans la zone texte définie. (zone restant entre start_zone_text_percent et end_zone_text_percent)

Valeurs possibles : 

  • center : affiché au milieu
  • left : affiché vers la gauche
  • right : affiché vers la droite

Disposition par défaut des widgets météo

# ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐ #
# │ ────────────────────────────────── DEFAULT WIDGETS LAYOUT ─────────────────────────────────── │ #
# └─────────────────────────────────────────────────────────────────────────────────────────────────────┘ #

# ─────────── default weather widget layout ─────────────────────────────────────────────────────────── #

# ─── NOTE: Change these parameters to customize the default weather widget layout ───

# ─── This option selects what name will be used in weather widget layout. ───
# ─── Possible values are : ───
# ───
# ... : definition_name ( Will use the field "host_name" for host and cluster ───
# and "service_description" for check ) ───
# Default : visualisation_name ( Will use the field visualisation_name ───
# for host, cluster and check ) ───
# ───
# broker__module_webui__module_service_weather__default_weather_widget_layout__name visualisation_name

# ─── This option allows you to select which of the context or status ───
# ─── will be the large icon and the small icon by default. ───
# ─── The from_webui value will use the value from WebUI, with the parameter : tiles_background ───
# ─── Mapping of the tiles_background values will be : ───
# ─── -> context : context_then_status ───
# ─── -> context_and_status : context_and_status ───
# ─── -> status : only_status ───
# ─── Possible values are : ───
# ───
# Default : from_webui ( Use the WebUI configuration. ) ───
# ... : context_then_status ( context on big icon, status on small icon. ) ───
# ... : status_then_context ( status on big icon, context on small icon. ) ───
# ... : only_status ( status on big icon, context is not display. ) ───
# ───
# broker__module_webui__module_service_weather__default_weather_widget_layout__state_icon from_webui

# ─── This option allows you to select how the background is made. ───
# ─── The from_webui value will use the value from WebUI, with the parameter : tiles_background ───
# ─── Mapping of the tiles_background values will be : ───
# ─── -> context : context_then_status ───
# ─── -> context_and_status : context_and_status ───
# ─── -> status : only_status ───
# ─── Possible values are : ───
# ───
# Default : from_webui ( Use the WebUI configuration. ) ───
# ... : context_then_status ( Will use the context to select the color. ───
# If there are no context, status will be use. ) ───
# ... : context_and_status ( Will use the context and the status to select the color. ) ───
# ... : only_status ( Will use the only status to select the color. ) ───
# ... : no_background ( The background will be blank. ) ───
# ───
# broker__module_webui__module_service_weather__default_weather_widget_layout__background from_webui

# ─── This option allows you to choose if the sla info will be displayed on the weather widget. ───
# ─── Deactivate SLA info will free MongoDB resources. ───
# ───
# ... : 0 => Disable ( Disable display SLA info ) ───
# Default : 1 => Enable ( Display SLA info ) ───
# ───
# broker__module_webui__module_service_weather__default_weather_widget_layout__sla 1

# ─── This option allows you to choose the default size the weather widget. ───
# ─── Format is WIDTH,HEIGHT. Size is in number of case. ───
# ─── Value "all" in width makes the widget take all the width. ───
# ───
# Default : 15,4 ( width:15 height:4 ) ───
# ───
# broker__module_webui__module_service_weather__default_weather_widget_layout__size 15,4


Nom

Type

Unité

Défaut

Commentaire


broker__module_webui__module_service_weather__default_weather_widget_layout__name


Texte

---

visualisation_name

Propriété des éléments utilisés pour afficher le nom sur la widget météo

  • definition_name : Va utiliser la propriété  host_name pour les hôtes et les clusters (définie dans la configuration)

  • visualisation_name : Va utiliser la propriété visualisation_name (définie dans la configuration)



broker__module_webui__module_service_weather__default_weather_widget_layout__state_icon


Texte

---

from_webui

Cette option permet de choisir comment s'affiche le statut et  le contexte d'un élément.

4 options sont disponibles : 

  • from_webui : Utilise la configuration de la WebUI
  • context_then_status : contexte dans la grande icône s’il y en a un et statuts dans la petite
  • status_then_context : statuts dans la grande icône et contexte dans la petite s’il y en a un
  • only_status : Le contexte n’est jamais affiché


Pour la valeur from_webui  on prendra la valeur du paramètre : tiles_background

Avec la correspondance suivante : 

  • context → context_then_status

  • context_and_status → context_then_status

  • status → status_then_context 



broker__module_webui__module_service_weather__default_weather_widget_layout__background


Texte

---

from_webui

Cette option permet de choisir comment s'affiche la couleur de fond d'un widget météo.

6 options sont disponibles :

  • from_webui : Utilise la configuration de la WebUI

  • context_then_status : Utilise la couleur du contexte. S’il n'y a pas de contexte la couleur du statut sera utilisé 

  • context_and_status : Utilise la couleur du contexte s’il y en a un et la couleur du statut.

  • only_status : Utilise la couleur du statut seulement

  • no_background: le background n'aura pas de couleur



broker__module_webui__module_service_weather__default_weather_widget_layout__sla


Booléen

---

1

Défini l'affichage des SLA de la journée et la tendance.

Valeurs possibles:

  • 1 : affiché
  • 0 : caché



broker__module_webui__module_service_weather__default_weather_widget_layout__size


Size---15,4

Cette option permet de choisir la taille par défaut du widget météo. 
Le format est LARGEUR,HAUTEUR.

La taille est en nombre de cases.
La valeur "all" en largeur fait que le widget prend toute la largeur.