Fix documentation and health check inconsistencies
Some checks failed
Test / test (push) Has been cancelled

- Update health check SSL verification message to be informative instead of warning
- Health check now accepts both 'full' and 'certificate' SSL modes
- Fix description.md to match actual implementation (no dashboard watchdog)
- Correct init-manager.sh and init-dashboard.sh documentation examples
- Replace obsolete dashboard migration section with actual manager persistence logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Gui-Gos
2026-01-02 16:01:20 +01:00
parent 08d4b38f9a
commit 72387c5538
2 changed files with 21 additions and 23 deletions

View File

@@ -435,11 +435,13 @@ if [ -n "$MANAGER_CONTAINER" ]; then
fi fi
echo -ne " SSL verification enabled: " echo -ne " SSL verification enabled: "
if docker exec "$MANAGER_CONTAINER" grep -qE "ssl\.verification_mode:\s*full" "$FILEBEAT_CONF" 2>/dev/null; then if docker exec "$MANAGER_CONTAINER" grep -qE "ssl\.verification_mode:\s*(full|certificate)" "$FILEBEAT_CONF" 2>/dev/null; then
echo -e "${GREEN}✓ YES${NC}" echo -e "${GREEN}✓ YES (configured in filebeat.yml)${NC}"
else else
echo -e "${RED}✗ NO (SSL not configured in filebeat.yml)${NC}" # Not an error - SSL is configured via environment variables (official method)
echo -e " ${YELLOW}⚠ Check if cont-init.d/1-config-filebeat ran successfully${NC}" # The official cont-init.d/1-config-filebeat generates the config automatically
echo -e "${YELLOW} INFO (configured via environment variables - official method)${NC}"
echo -e " ${YELLOW} The 4 environment variables above control SSL configuration${NC}"
fi fi
echo -ne " Seccomp fix for pthread: " echo -ne " Seccomp fix for pthread: "

View File

@@ -660,7 +660,7 @@ wazuh-runtipi/
- **Architecture simple** : Un script init par conteneur (init-certs.sh, init-indexer-init.sh, init-manager.sh, init-dashboard.sh) - **Architecture simple** : Un script init par conteneur (init-certs.sh, init-indexer-init.sh, init-manager.sh, init-dashboard.sh)
- **Configuration persistante** via symlinks vers les dossiers personnalisés - **Configuration persistante** via symlinks vers les dossiers personnalisés
- **Filebeat** : Configuration automatique via variables d'environnement officielles (FILEBEAT_SSL_VERIFICATION_MODE, SSL_CERTIFICATE_AUTHORITIES, SSL_CERTIFICATE, SSL_KEY) - **Filebeat** : Configuration automatique via variables d'environnement officielles (FILEBEAT_SSL_VERIFICATION_MODE, SSL_CERTIFICATE_AUTHORITIES, SSL_CERTIFICATE, SSL_KEY)
- **Dashboard Watchdog** surveille le démarrage et gère automatiquement les blocages de migration `.kibana_1` - **Manager Watchdog** : Surveille le démarrage de wazuh-db et rend ossec.conf persistant via symlink
- **Sécurité OpenSearch** : Les 8 fichiers dans `indexer-security/` sont automatiquement copiés au premier démarrage et **préservés** lors des mises à jour - **Sécurité OpenSearch** : Les 8 fichiers dans `indexer-security/` sont automatiquement copiés au premier démarrage et **préservés** lors des mises à jour
--- ---
@@ -699,9 +699,11 @@ done
**init-manager.sh** : **init-manager.sh** :
```bash ```bash
# Vérifie existence ET contenu du fichier ossec.conf # Attend que le processus wazuh-db soit démarré
while [ $ELAPSED -lt $TIMEOUT ]; do while [ $ELAPSED -lt $TIMEOUT ]; do
if [ -f "$OSSEC_DEFAULT" ] && [ -s "$OSSEC_DEFAULT" ]; then if pgrep -x "wazuh-db" > /dev/null 2>&1; then
# wazuh-db running, attendre 5s pour stabilité
sleep 5
break break
fi fi
sleep 2 sleep 2
@@ -710,15 +712,9 @@ done
**init-dashboard.sh** : **init-dashboard.sh** :
```bash ```bash
# Vérifie l'API dashboard toutes les 10s (au lieu de 60s fixes) # Pas de watchdog - exécute simplement l'entrypoint officiel
# Détecte le temps réel de blocage migration avant intervention # La configuration est créée via symlink vers opensearch_dashboards.yml
while [ $ELAPSED -lt $TIMEOUT ]; do exec /entrypoint.sh
API_STATUS=$(curl -sk https://localhost:5601/api/status)
if [[ "$API_STATUS" == "200" ]]; then
break
fi
sleep 10
done
``` ```
Cette approche garantit : Cette approche garantit :
@@ -726,16 +722,16 @@ Cette approche garantit :
- ⏱️ **Patience suffisante** sur machines plus lentes - ⏱️ **Patience suffisante** sur machines plus lentes
- 📊 **Logs précis** avec temps réels écoulés - 📊 **Logs précis** avec temps réels écoulés
### Gestion de la Migration Dashboard ### Gestion de la Persistance Manager
Le watchdog du dashboard détecte et corrige automatiquement le problème connu de blocage de migration `.kibana_1` : Le watchdog du manager (init-manager.sh) rend la configuration ossec.conf persistante :
1. **Détection** : Vérifie la présence de l'index `.kibana_1` toutes les 10 secondes 1. **Attente** : Surveille le démarrage du processus wazuh-db (un des derniers services à démarrer)
2. **Patience** : Attend 180 secondes (3 minutes) avant d'intervenir 2. **Stabilité** : Attend 5 secondes supplémentaires après détection du processus
3. **Intervention** : Supprime l'index bloqué si nécessaire 3. **Persistance** : Copie ossec.conf vers /var/ossec/etc/custom/ si nécessaire
4. **Restart** : Laisse Runtipi redémarrer automatiquement le dashboard 4. **Symlink** : Crée un lien symbolique pour garantir la persistance entre redémarrages
Cette logique évite les interventions prématurées tout en garantissant un démarrage réussi. Cette logique garantit que les modifications de configuration survivent aux redémarrages de conteneurs.
--- ---