112 lines
4.3 KiB
Markdown
112 lines
4.3 KiB
Markdown
---
|
|
title: Domain Watchdog
|
|
created: 2026-06-07
|
|
updated: 2026-06-07
|
|
type: app
|
|
tags: [catalogue, networking, monitoring, domains, python, whois]
|
|
confidence: high
|
|
contested: false
|
|
sources: [https://selfh.st/apps/?tag=networking, https://github.com/domcowb/devops-net/tree/main/domain-watchdog]
|
|
---
|
|
|
|
# Domain Watchdog 🐕
|
|
|
|
> Outil Python de surveillance des dates d'expiration de domaines via requêtes WHOIS, avec alertes mail/webhook avant échéance.
|
|
|
|
| Métadonnée | Valeur |
|
|
| :--- | :--- |
|
|
| **Site web** | https://github.com/domcowb/devops-net |
|
|
| **GitHub** | https://github.com/domcowb/devops-net |
|
|
| **License** | MIT |
|
|
| **Langage** | Python |
|
|
| **Étoiles** | 27 ⭐ |
|
|
| **Dernière MAJ** | 2024 |
|
|
| **Catégorie** | [[cat-networking]] |
|
|
|
|
## Description
|
|
|
|
**Domain Watchdog** est un petit service Python conçu pour suivre la santé de votre portefeuille de noms de domaine. L'application interroge périodiquement les serveurs WHOIS des registres pour récupérer les dates d'expiration, les serveurs de noms actuels, le registrar, et l'état de chaque domaine. Lorsqu'un domaine approche de sa date d'échéance (seuil configurable, par exemple 30 ou 60 jours), une alerte est envoyée.
|
|
|
|
Les notifications supportent plusieurs canaux : **email SMTP**, **webhooks** génériques (compatibles Discord, Slack, Gotify, Ntfy), et journalisation locale. L'application peut tourner en mode « one-shot » via cron ou en mode démon avec boucle de sommeil interne. Une interface web minimaliste (Flask) permet de visualiser l'état de tous les domaines surveillés.
|
|
|
|
C'est l'outil idéal pour les auto-hébergés qui gèrent quelques dizaines de domaines (sites perso, projets, redirections) et qui veulent éviter le classique « oups, j'ai oublié de renouveler ». Bien plus léger qu'un observabilité complète type Uptime Kuma, il se concentre sur une seule métrique critique : la **date d'expiration**.
|
|
|
|
## Installation
|
|
|
|
### Docker Compose (recommandé)
|
|
|
|
```yaml
|
|
services:
|
|
domain-watchdog:
|
|
image: ghcr.io/domcowb/domain-watchdog:latest
|
|
container_name: domain-watchdog
|
|
restart: unless-stopped
|
|
environment:
|
|
- TZ=Europe/Paris
|
|
- CHECK_INTERVAL=86400 # 24h
|
|
- ALERT_DAYS=30
|
|
- SMTP_HOST=smtp.example.com
|
|
- SMTP_PORT=587
|
|
- SMTP_USER=alerts@example.com
|
|
- SMTP_PASS=changeme
|
|
- ALERT_TO=admin@example.com
|
|
- WEBHOOK_URL=https://ntfy.example.com/domain-watchdog
|
|
volumes:
|
|
- ./data:/app/data
|
|
ports:
|
|
- "8085:5000"
|
|
```
|
|
|
|
### Manuelle (Python)
|
|
|
|
```bash
|
|
git clone https://github.com/domcowb/devops-net.git
|
|
cd devops-net/domain-watchdog
|
|
python -m venv venv && source venv/bin/activate
|
|
pip install -r requirements.txt
|
|
cp config.example.yml config.yml
|
|
python app.py
|
|
```
|
|
|
|
## Configuration
|
|
|
|
Le fichier `config.yml` liste les domaines à surveiller :
|
|
|
|
```yaml
|
|
domains:
|
|
- example.com
|
|
- monsite.fr
|
|
- projet-perso.io
|
|
checks:
|
|
interval: 86400
|
|
alert_threshold_days: 30
|
|
notifications:
|
|
email: { enabled: true, ... }
|
|
webhook: { enabled: true, url: "..." }
|
|
```
|
|
|
|
## Alternatives
|
|
|
|
- **Open Source** : [[app-uptime-kuma]] (monitoring plus large), [domain-expiry-tracker](https://github.com/BrandwatchLtd/domain-expiry-tracker) (Go), [expired-domains](https://github.com/zerodotio/expired-domains) (script)
|
|
- **Propriétaire** : Domain.com monitoring, Namecheap PremiumDNS alerts, Pingdom (payants, peu de self-hosting)
|
|
- **Registrar-side** : beaucoup de registrars (OVH, Gandi, Cloudflare) envoient déjà des alertes par email — Domain Watchdog sert surtout à **unifier** la surveillance multi-registrar.
|
|
|
|
## Sécurité
|
|
|
|
- Les credentials SMTP sont passés par variables d'environnement, jamais en clair dans le repo.
|
|
- L'app ne fait que des requêtes WHOIS sortantes (port 43) — pas d'exposition réseau entrante critique.
|
|
- Si l'interface web est exposée, placer derrière un reverse-proxy avec authentification (Authelia, Authentik).
|
|
- Limiter l'accès au dossier `data/` qui peut contenir un cache des réponses WHOIS.
|
|
|
|
## Ressources
|
|
|
|
- [selfh.st — Networking](https://selfh.st/apps/?tag=networking)
|
|
- [GitHub domcowb/devops-net](https://github.com/domcowb/devops-net)
|
|
- [RFC 3912 — WHOIS protocol](https://www.rfc-editor.org/rfc/rfc3912)
|
|
|
|
## Pages Liées
|
|
|
|
- [[cat-networking]]
|
|
- [[recettes-docker-compose]]
|
|
- [[app-uptime-kuma]] — monitoring uptime plus large
|