33800 Docs

← Retour

Monitoring Dashboard

Source : CLAUDE.md lignes 776-875

Scripts d'automatisation

Chemin principal

/stock_8to/33800-stack/scripts/

Commandes Nginx

# Générer config
/stock_8to/33800-stack/scripts/nginx/generate.sh <project> <service> <env> <port>

# Déployer config
/stock_8to/33800-stack/scripts/nginx/deploy.sh <config_file>

# Tester + recharger
ssh gouroubleu@nginx.local "sudo nginx -t && sudo systemctl reload nginx"

Crons

Vue d'ensemble

Machine Cron Schedule Description
PVE monitoring-33800 0 * * * * Collecte monitoring + génération dashboard
PVE rsync-stock8-to-stock36 0 * * * * Sync horaire 33800-stack + backups
PVE rsync-stock8-to-stock36 0 5 * * * Sync quotidien complet
PVE nginx-logs-archive 55 23 * * * Archivage logs nginx
PVE zfsutils-linux 1er dim/mois ZFS TRIM
PVE zfsutils-linux 2ème dim/mois ZFS Scrub
Proxmox 155 rsync-stock1to-backup 0 * * * * Sync stock_1to → stock_36to
GitLab gitlab-backup 0 */6 * * * Backup GitLab (6h)

PVE - Rsync stock_8to → stock_36to

# /etc/cron.d/rsync-stock8-to-stock36
0 * * * * root rsync -av --delete /stock_8to/33800-stack/ /stock_36to/data/backup-stock8/33800-stack/
5 * * * * root rsync -av --delete /stock_8to/backups/ /stock_36to/data/backup-stock8/backups/
0 5 * * * root rsync -av --delete /stock_8to/ /stock_36to/data/backup-stock8/

PVE - Monitoring Dashboard

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

GitLab - Backup

# /etc/cron.d/gitlab-backup (sur gitlab.local)
0 */6 * * * root gitlab-backup create STRATEGY=copy SKIP=artifacts,registry

Containers Docker (scheduler.json)

Les schedulers internes aux containers sont détectés automatiquement via scheduler.json. Voir memory/docker.md section Convention scheduler.json.

Dashboard

Nouveau dashboard Qwik SSR (actif depuis 02/2026)

Ancien dashboard O2switch (toujours actif, généré par cron)

Déploiement O2switch

Remote git : o2switch:repositories/dashboard.git

Post-receive hook (~/repositories/dashboard.git/hooks/post-receive) :

#!/bin/bash
TARGET="/home/deas8499/public_html/dashboard"
GIT_DIR="/home/deas8499/repositories/dashboard.git"
git --work-tree=$TARGET --git-dir=$GIT_DIR checkout -f main
# Fix permissions pour le serveur web
find $TARGET -type f -exec chmod 644 {} \;
find $TARGET -type d -exec chmod 755 {} \;

Note : Le chmod est nécessaire car git checkout préserve les permissions locales (600) qui bloquent Apache.

Problèmes connus

Fichier Problème Solution
services-registry.json Créé par root (cron) → git add échoue sudo chown gouroubleu:gouroubleu services-registry.json
assets/style.css Permissions 600 après checkout Hook post-receive fait chmod 644

Ajouter un nouveau service au dashboard

  1. config.json : Ajouter le service dans la section services

    "mon-service": {
      "host": "prod-portainer",
      "port": 1234,
      "domain": "mon-service.33800.nowhere84.com",
      "label": "Mon Service"
    }
  2. Navigation : Ajouter le lien dans generate.d/01-index.sh (section nav)

  3. Page dediee (optionnel) : Creer generate.d/XX-monservice.sh

    • Copier un template existant (ex: 14-syncthing.sh)
    • Ajouter l'appel dans generate.sh
  4. Regenerer : ./generate.sh

Pages actuelles

Page Script Description
index.html 01-index.sh Dashboard principal
linkedin.html 15-linkedin.sh Connector LinkedIn
syncthing.html 14-syncthing.sh Sync Anbernic
raidz.html 12-raidz.sh Status ZFS