33800 Docs

← Retour

Tache : Dashboard NeedFinder + Refactoring Monitoring

Date : 11/01/2026 20:30 Statut : TERMINE Fin : 11/01/2026 22:55


1. Dashboard NeedFinder

Realise

Cree un dashboard complet pour visualiser les besoins detectes :

URL : https://dashboard.33800.nowhere84.com/needfinder.html

Fonctionnalites :

Fichier modifie :

Stats actuelles :


2. Refactoring Monitoring (debut)

Structure cible

monitoring/
├── collect.sh              # Orchestrateur
├── collect.d/              # Modules de collecte
│   ├── _common.sh          # Fonctions partagees
│   ├── 01-pve.sh           # PVE + ZFS (FAIT)
│   ├── 02-proxmox1.sh      # Proxmox 155
│   ├── 03-prod-portainer.sh
│   └── ...
├── generate.sh             # Orchestrateur
└── generate.d/             # Modules de generation

Module PVE valide

Fichiers crees :

Modification collect.sh :

Test :

$ /stock_8to/33800-stack/monitoring/collect.d/01-pve.sh
[...] Collecte pve...
[...] PVE: status=ok, zfs=ONLINE, cpu=6%, ram=67%
PVE_STATUS=ok
PVE_ZFS_STATE=ONLINE

Modules realises

Integration collect.sh

Les 8 modules sont integres dans collect.sh avec fallback si module absent. Test complet reussi - tous les modules fonctionnent.

Modules generate.d realises

Scripts externes (non modularises)

Integration generate.sh

11 modules integres dans generate.sh avec chargement conditionnel. Test complet reussi - tous les modules fonctionnent. generate.sh reduit de 6223 a 4788 lignes (-23%)


3. Structure finale

/stock_8to/33800-stack/monitoring/
├── collect.sh                    # Orchestrateur collecte (appelle collect.d/)
├── collect.d/                    # Modules de collecte par machine
│   ├── _common.sh                # Fonctions partagees
│   ├── 01-pve.sh                 # PVE (192.168.1.10)
│   ├── 02-proxmox1.sh            # Proxmox 155
│   ├── 03-prod-portainer.sh      # Docker PROD
│   ├── 04-dev-portainer.sh       # Docker DEV
│   ├── 05-gitlab.sh              # GitLab CE
│   ├── 06-nginx.sh               # Reverse proxy
│   ├── 07-jellyfin.sh            # Media server
│   └── 08-win11.sh               # Windows Gaming
├── generate.sh                   # Orchestrateur generation (appelle generate.d/)
├── generate.d/                   # Modules de generation par page
│   ├── _common.sh                # Fonctions HTML, deploy_page()
│   ├── 01-index.sh               # Dashboard principal (1343 lignes)
│   ├── 02-alerts.sh              # Centre d'alertes
│   ├── 03-doc.sh                 # Documentation infra
│   ├── 04-secrets.sh             # Credentials
│   ├── 05-endpoints.sh           # API endpoints (1024 lignes)
│   ├── 06-montages.sh            # Montages NFS
│   ├── 07-nginx.sh               # Sites Nginx
│   ├── 08-crons.sh               # Timeline crons (810 lignes)
│   ├── 12-raidz.sh               # RAIDZ status
│   └── 13-models.sh              # Guide modeles IA
├── generate-needfinder.sh        # Script externe NeedFinder
├── generate-services.sh          # Script externe Services
├── generate-yolo.sh              # Script externe YOLO
└── current.json                  # Donnees collectees (source pour generate)

4. Pages generees

Page URL Module
Dashboard https://dashboard.33800.nowhere84.com/index.html 01-index.sh
Alertes https://dashboard.33800.nowhere84.com/alerts.html 02-alerts.sh
Documentation https://dashboard.33800.nowhere84.com/doc.html 03-doc.sh
Secrets https://dashboard.33800.nowhere84.com/secrets.html 04-secrets.sh
Endpoints API https://dashboard.33800.nowhere84.com/endpoints.html 05-endpoints.sh
Montages https://dashboard.33800.nowhere84.com/montages.html 06-montages.sh
Sites Nginx https://dashboard.33800.nowhere84.com/nginx.html 07-nginx.sh
Crons https://dashboard.33800.nowhere84.com/crons.html 08-crons.sh
RAIDZ https://dashboard.33800.nowhere84.com/raidz.html 12-raidz.sh
Modeles IA https://dashboard.33800.nowhere84.com/models.html 13-models.sh
NeedFinder https://dashboard.33800.nowhere84.com/needfinder.html externe
Services https://dashboard.33800.nowhere84.com/services.html externe
YOLO https://dashboard.33800.nowhere84.com/yolo.html externe

5. Utilisation

Execution manuelle

# Collecte + Generation complete
/stock_8to/33800-stack/monitoring/collect.sh

# Generation seule (utilise current.json existant)
/stock_8to/33800-stack/monitoring/generate.sh

# Test module standalone
/stock_8to/33800-stack/monitoring/generate.d/08-crons.sh

Cron (toutes les heures)

# /etc/cron.d/monitoring-33800
0 * * * * gouroubleu /stock_8to/33800-stack/monitoring/collect.sh

Ajouter un nouveau module generate.d

  1. Creer generate.d/XX-name.sh avec fonction generate_name()
  2. Utiliser deploy_page "$OUTPUT_FILE" "name.html" pour deploiement
  3. Ajouter bloc conditionnel dans generate.sh

6. Statistiques

Metrique Avant Apres Gain
generate.sh 6223 lignes 4788 lignes -23%
Modules collect.d 0 8 +8
Modules generate.d 0 11 +11
Total lignes modules 0 5339 -

7. Ajout Cache Jellyfin (post-refactoring)

Date : 11/01/2026 23:10

Ajout monitoring du cache transcoding Jellyfin :

"cache": {
  "size": "9,2G",
  "files": 1101
}

8. Restauration Systeme Notifications (post-refactoring)

Date : 11/01/2026 23:30

Le service notif-logger etait arrete depuis le 05-01-2026 (incident Docker).

Probleme identifie

Resolution

  1. Rebuild Docker : Cache Docker corrompu → docker system prune -af
  2. Build avec network : docker build --network=host (acces registries npm/bun)
  3. Table Supabase manquante : Creation table public.logs
  4. Lancement container : Sur reseau notifications_notifications
  5. Mise a jour collect.sh : Utilise notif-logger au lieu de ntfy direct

Architecture notifications

collect.sh → notif-logger (5300) → log Supabase → Apprise (8000) → ntfy/mail

Modification collect.sh

# Avant (ntfy direct)
curl -s -H "Title: ..." ntfy.33800.nowhere84.com/infra-33800

# Apres (via notif-logger)
curl -s -X POST "http://192.168.1.12:5300/api/notify/push" \
    -H "Content-Type: application/json" \
    -d '{"title": "...", "body": "..."}'

Stats notif-logger

{
  "total": 4,
  "sent": 4,
  "failed": 0,
  "push_count": 3,
  "mail_count": 1
}

Fix Docker Bridge Network (12/01/2026 00:17)

Probleme : Docker bridge network sur prod-portainer n'avait pas d'acces internet. Les containers ne pouvaient pas joindre ntfy.sh pour le push mobile.

Solution : Passage des services en --network=host :

Modifications :

Test valide : collect.sh envoie notification "🔴 33800 ALERTE" recue sur mobile.


Statut : COMPLET (collect.d 8/8, generate.d 11/11, notifications OK)