- Verificación HTTP/HTTPS con std.http.Client - Verificación TCP con resolución DNS (tcpConnectToHost) - 5 servicios configurados: Forgejo (HTTP+SSH), Simifactu, Mundisofa, Menzuri - Output terminal con colores y tiempos de respuesta - Doc comments en todas las funciones públicas (estándar open source) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
53 lines
1.7 KiB
Markdown
53 lines
1.7 KiB
Markdown
# Diario de Desarrollo - service-monitor
|
|
|
|
## 2025-12-07 - Sesión 1: Inicio proyecto
|
|
|
|
### Contexto
|
|
- Proyecto nuevo: Monitor de servicios para servidor Hetzner (Simba)
|
|
- Lenguaje: Zig 0.13.0
|
|
- Objetivo: Herramienta ligera, sin dependencias externas, potencialmente open source
|
|
|
|
### Implementado - Fase 1 Básica
|
|
|
|
**Estructura creada:**
|
|
```
|
|
service-monitor/
|
|
├── build.zig # Sistema build Zig
|
|
├── CLAUDE.md # Especificación proyecto
|
|
├── docs/ # Documentación
|
|
│ └── DIARIO_DESARROLLO.md
|
|
└── src/
|
|
├── main.zig # Entry point + output terminal
|
|
├── http.zig # Verificación HTTP/HTTPS (std.http.Client)
|
|
├── tcp.zig # Verificación TCP (std.net)
|
|
└── config.zig # Lista servicios hardcoded
|
|
```
|
|
|
|
**Servicios configurados:**
|
|
1. Forgejo HTTP - https://git.reugenio.com
|
|
2. Forgejo SSH - git.reugenio.com:2222
|
|
3. Simifactu API - https://simifactu.com
|
|
4. Mundisofa - https://mundisofa.com
|
|
5. Menzuri - https://menzuri.com
|
|
|
|
**Detalles técnicos Zig 0.13:**
|
|
- `std.http.Client.open()` requiere `server_header_buffer` obligatorio
|
|
- `std.time.Timer` debe ser `var` (no `const`) para llamar `.read()`
|
|
- Output con colores ANSI: `\x1b[32m` verde, `\x1b[31m` rojo, `\x1b[0m` reset
|
|
|
|
**Normas aplicadas:**
|
|
- Doc comments (`///`) en todas las funciones públicas
|
|
- Código idiomático Zig (snake_case, error handling explícito)
|
|
- Preparado para open source
|
|
|
|
### Pendiente - Fases 2 y 3
|
|
- [ ] Fase 2: Modo daemon + intervalo configurable + logs
|
|
- [ ] Fase 3: Notificaciones (libnotify, webhook, email)
|
|
|
|
### Comandos
|
|
```bash
|
|
zig build # Compilar
|
|
zig build run # Ejecutar verificación
|
|
```
|
|
|
|
---
|