Prometheus auto-discovery via file_sd_configs for MCP servers
Decision
Python script /opt/prometheus/discovery/mcp-discovery.py runs via cron every 60s, inspects Docker container healthchecks, writes file_sd_configs JSON to /opt/prometheus/targets/. Prometheus auto-reloads targets.
Rationale
No manual target list maintenance. New MCP server deployed = auto-discovered on next cron run. Removed servers auto-cleaned. Uses container healthcheck commands to classify HTTP vs TCP probes. Replaces manual static_configs that went stale.
Alternatives Rejected
Rejected: (1) Manual static_configs — always stale, (2) Consul service discovery — overkill for single VPS, (3) Docker SD — less control over target classification
Outcome
Pending