33800 Docs

← Retour

Task : Phase 3A - Centralisation Config Dashboard

Date : 13/01/2026 13:35 Duree : ~15 min Statut : TERMINE


Objectif

Centraliser les IPs et configurations du dashboard dans un fichier config.json.


Realisations

1. Creation de config.json

Fichier : /stock_8to/33800-stack/monitoring/config.json

Contenu :

2. Modification de _common.sh

Fonctions ajoutees :

get_config()      # Lire valeur depuis config.json
get_host_ip()     # Obtenir IP d'un host
get_host_port()   # Obtenir port web d'un host
get_host_label()  # Obtenir label d'un host
get_service_domain()  # Obtenir domaine d'un service

Modifications :

3. Test

./generate.sh  # OK - toutes les pages generees et deployees

Fichiers Modifies

Fichier Action
/stock_8to/33800-stack/monitoring/config.json Cree
/stock_8to/33800-stack/monitoring/generate.d/_common.sh Modifie

Impact

deploy_page() : Tous les scripts (12) utilisent cette fonction pour deployer sur nginx. L'IP est maintenant lue depuis config.json.

gen_footer_full() : Fonction prete mais non utilisee par les scripts actuels (ils ont leurs propres footers). Disponible pour refactoring futur.


Prochaines Etapes (Phase 3B)

  1. Migrer 01-index.sh pour utiliser config.json (nameMap, sections serveurs)
  2. Migrer les footers des scripts individuels vers gen_footer_full()
  3. Migrer les scripts avec IPs hardcodees restantes

Notes