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
Related
- split-azure-m365-mcp-into-two-pure-play-servers-2
- dual-reverse-proxy-nginx-edge-traefik-internal
- mcp-servers-streamable-http-on-port-8000-traefik-routed
- prometheus-alert-rules-verify-metric-existence-before
- auto-integration-loops-for-capability-self-propagation
- brainstorm-service-systemd-port-17777-always-on