33800 Docs

← Retour

Proposition : Strategie d'acces aux fichiers depuis le Dashboard

Date : 08/01/2026 Status : VALIDÉ


Principe General

Type de fichier Strategie Acces
Logs systeme Copier vers stock_8to /download/logs/
Configs (non versionnees) Copier vers stock_8to /download/configs/
Configs versionnees Lien GitLab gitlab.33800.../blob/...
Projets Lien GitLab gitlab.33800.../project
Donnees generees Copier vers stock_8to /download/data/

1. Structure sur stock_8to

/stock_8to/33800-stack/monitoring/
├── downloads/                    # Fichiers accessibles via nginx
│   ├── logs/                     # Logs systeme
│   │   ├── rsync-stock8.log
│   │   ├── rsync-stock1to.log
│   │   ├── gitlab-backup.log
│   │   ├── monitoring-collect.log
│   │   └── nginx-access.log
│   ├── configs/                  # Configs non versionnees
│   │   ├── nginx/               # Copie des configs nginx actives
│   │   ├── cron/                # Exports crontabs
│   │   └── systemd/             # Unit files customs
│   └── data/                     # Donnees generees
│       ├── zfs-status.txt
│       ├── docker-ps.txt
│       └── disk-usage.txt

2. Route Nginx pour /download/

Fichier : /etc/nginx/sites-available/dashboard.33800.nowhere84.com.conf

location /download/ {
    alias /mnt/nfs/stock8/33800-stack/monitoring/downloads/;
    autoindex on;
    autoindex_exact_size off;
    autoindex_localtime on;

    # Restriction reseau local uniquement
    allow 192.168.1.0/24;
    allow 10.10.10.0/24;
    deny all;
}

3. Collecte des fichiers (dans collect.sh)

Ajouter a la fin de collect.sh :

# === COLLECTE FICHIERS POUR DOWNLOAD ===
DOWNLOAD_DIR="/stock_8to/33800-stack/monitoring/downloads"

# Logs
mkdir -p "$DOWNLOAD_DIR/logs"
cp /var/log/rsync-stock8-backup.log "$DOWNLOAD_DIR/logs/" 2>/dev/null
ssh gouroubleu@192.168.1.155 "cat /var/log/rsync-stock1to-backup.log" > "$DOWNLOAD_DIR/logs/rsync-stock1to.log" 2>/dev/null
ssh gouroubleu@192.168.1.196 "sudo journalctl -u gitlab-runsvdir -n 100 --no-pager" > "$DOWNLOAD_DIR/logs/gitlab-backup.log" 2>/dev/null

# Configs nginx (copie)
mkdir -p "$DOWNLOAD_DIR/configs/nginx"
ssh gouroubleu@192.168.1.104 "cat /etc/nginx/sites-available/*.conf" > "$DOWNLOAD_DIR/configs/nginx/all-sites.conf" 2>/dev/null

# Crontabs
mkdir -p "$DOWNLOAD_DIR/configs/cron"
crontab -l > "$DOWNLOAD_DIR/configs/cron/pve-gouroubleu.cron" 2>/dev/null
cat /etc/cron.d/* > "$DOWNLOAD_DIR/configs/cron/pve-system.cron" 2>/dev/null

# Data systeme
mkdir -p "$DOWNLOAD_DIR/data"
zpool status > "$DOWNLOAD_DIR/data/zfs-status.txt" 2>/dev/null
zfs list > "$DOWNLOAD_DIR/data/zfs-list.txt" 2>/dev/null

4. Liens GitLab - Projets

Projet Description Lien
dashboard-33800 Dashboard monitoring https://gitlab.33800.nowhere84.com/gouroubleu/dashboard-33800
needfinder App recherche besoins https://gitlab.33800.nowhere84.com/gouroubleu/needfinder
ffmpeg-api API transcodage https://gitlab.33800.nowhere84.com/gouroubleu/ffmpeg-api
exchange-api API exchange crypto https://gitlab.33800.nowhere84.com/gouroubleu/exchange-api
exchange-front Frontend exchange https://gitlab.33800.nowhere84.com/gouroubleu/exchange-front
tintech-api API Tintech https://gitlab.33800.nowhere84.com/gouroubleu/tintech-api
tintech-front Frontend Tintech https://gitlab.33800.nowhere84.com/gouroubleu/tintech-front
hello-car-api API HelloCar https://gitlab.33800.nowhere84.com/gouroubleu/hello-car-api
hello-car-front Frontend HelloCar https://gitlab.33800.nowhere84.com/gouroubleu/hello-car-front
hello-car-app App mobile HelloCar https://gitlab.33800.nowhere84.com/gouroubleu/hello-car-app
authentificator Service auth https://gitlab.33800.nowhere84.com/gouroubleu/authentificator
auth-lib Lib auth partagee https://gitlab.33800.nowhere84.com/gouroubleu/auth-lib
yolo-api API detection objets https://gitlab.33800.nowhere84.com/gouroubleu/yolo-api
jellylink-client Client Jellylink https://gitlab.33800.nowhere84.com/gouroubleu/jellylink-client
qwikpress CMS Qwik https://gitlab.33800.nowhere84.com/gouroubleu/qwikpress
nova-web-site Site Nova https://gitlab.33800.nowhere84.com/gouroubleu/nova-web-site
projects-docs Documentation projets https://gitlab.33800.nowhere84.com/gouroubleu/projects-docs

5. Liens GitLab - Fichiers specifiques

Configs Docker (dans les repos)

Scripts monitoring

Documentation


6. Integration dans le Dashboard

Page Crons - Bouton "Voir log complet"

<a href="/download/logs/rsync-stock8.log" target="_blank" class="cron-action">
    Voir log complet
</a>

Page Nginx - Lien vers config

Si config dans repo GitLab :

<a href="https://gitlab.33800.../blob/main/nginx/site.conf">Voir sur GitLab</a>

Sinon :

<a href="/download/configs/nginx/all-sites.conf">Telecharger configs</a>

Page Doc - Liens projets

Liste des projets avec badges et liens directs vers GitLab.


7. Taches a realiser

  1. [ ] Creer structure /stock_8to/.../monitoring/downloads/
  2. [ ] Ajouter route nginx /download/
  3. [ ] Modifier collect.sh pour copier les fichiers
  4. [ ] Ajouter boutons "Voir log" dans page Crons
  5. [ ] Creer page "Projets GitLab" avec liens
  6. [ ] Mettre a jour page Nginx avec liens vers configs

Avantages


Questions (RÉSOLUES)

  1. Faut-il versionner les configs nginx dans un repo dedie ?Oui (nginx-configs repo)
  2. Rotation des logs dans downloads/ (garder 7 jours ?)1 mois (31 jours)
  3. Ajouter d'autres logs (docker, systemd services) ?Oui (Docker logs inclus)