feat: add PHP-FPM, nginx, SSL, and port monitoring

All four are opt-in via config file:
- FPM_STATUS_URL — PHP-FPM pool stats (active/idle workers, slow requests, max children reached, accepted conn)
- NGINX_STATUS_URL — nginx stub_status (active connections, reading/writing/waiting, accepts/handled/requests)
- SSL_DOMAINS — TLS cert expiry check per domain (days left, valid, expires_at)
- CHECK_PORTS — TCP port availability per port with known service name mapping

Also refactors loadConfigFromFile to return *Config directly instead of a positional tuple.
This commit is contained in:
Joel Male
2026-02-26 11:50:54 +10:00
parent 9365e64cdb
commit 4018ba5c4a
3 changed files with 361 additions and 63 deletions
+16
View File
@@ -14,3 +14,19 @@ TOKEN=your-token-here
# Optional — logs full response body from the server
# DEBUG=true
# ─────────────────────────────────────────────────────────────
# Optional integrations
# ─────────────────────────────────────────────────────────────
# PHP-FPM status page URL (requires pm.status_path = /status in php-fpm pool config)
# FPM_STATUS_URL=http://127.0.0.1/fpm-status
# Nginx stub_status URL (requires stub_status module and location block)
# NGINX_STATUS_URL=http://127.0.0.1/nginx-status
# SSL certificate expiry checks — comma-separated list of domains
# SSL_DOMAINS=example.com,api.example.com
# TCP port availability checks — comma-separated list of port numbers
# CHECK_PORTS=22,80,443,3306,6379