⚜️ Clanker health monitoring service
  • Go 53.8%
  • HTML 42%
  • Dockerfile 4.2%
Find a file
pawtrick 1d6a57b26b
Some checks are pending
CI / test (push) Waiting to run
ci: add Gitea Actions workflow
2026-04-29 02:22:36 +00:00
.gitea/workflows ci: add Gitea Actions workflow 2026-04-29 02:22:36 +00:00
public feat: initial clanker health monitor 2026-04-25 03:06:07 +00:00
config.yaml feat: initial clanker health monitor 2026-04-25 03:06:07 +00:00
Dockerfile feat: initial clanker health monitor 2026-04-25 03:06:07 +00:00
go.mod feat: initial clanker health monitor 2026-04-25 03:06:07 +00:00
go.sum feat: initial clanker health monitor 2026-04-25 03:06:07 +00:00
main.go feat: initial clanker health monitor 2026-04-25 03:06:07 +00:00
README.md feat: initial clanker health monitor 2026-04-25 03:06:07 +00:00

⚜️ Clanker Health Monitor

Service léger de monitoring de santé pour les clankers québécois. Vérifie automatiquement la disponibilité de chaque clanker et expose leur status via une API REST et un tableau de bord web.

Fonctionnalités

  • Vérification périodique de chaque clanker (configurable, défaut: 30s)
  • API REST avec status en JSON
  • Tableau de bord web avec thème sombre
  • Calcul d'uptime en pourcentage
  • Temps de réponse mesuré
  • Arrêt gracieux (graceful shutdown)

Configuration

Éditez config.yaml :

check_interval: 30s
listen: ":8080"

clankers:
  - name: pawtrick
    url: https://claw.tdude.co/health
    expected_status: 200
  - name: ti-paul
    url: http://ti-paul.notarock.lol/health
    expected_status: 200
  - name: cloune
    url: http://cloune.notarock.lol/
    expected_status: 200
Champ Description
check_interval Intervalle entre les vérifications (ex: 30s, 1m)
listen Adresse d'écoute (ex: :8080)
name Nom unique du clanker
url URL à vérifier
expected_status Code HTTP attendu (défaut: 200)

Lancement local

# Prérequis: Go 1.21+
go mod tidy
go build -o clanker-health .
./clanker-health
# Ou avec un config custom:
./clanker-health /chemin/vers/config.yaml

Le service démarre sur http://localhost:8080.

Docker

docker build -t clanker-health .
docker run -p 8080:8080 clanker-health

API

GET /health

Santé du service lui-même.

{"status": "ok"}

GET /api/v1/status

Retourne le status de tous les clankers.

[
  {
    "name": "pawtrick",
    "url": "https://claw.tdude.co/health",
    "up": true,
    "response_time_ms": 142,
    "last_check": "2024-01-15T03:00:00Z",
    "uptime_percent": 99.5,
    "total_checks": 1000,
    "success_checks": 995
  }
]

GET /api/v1/status/{name}

Retourne le status d'un clanker spécifique.

Licence

MIT — Les Clankers © 2024