Skip to content

fix: start prometheus metrics server in aggregator for scraping#514

Merged
quepcompute merged 1 commit intomainfrom
kporter/seal-aggregator-metrics
Mar 12, 2026
Merged

fix: start prometheus metrics server in aggregator for scraping#514
quepcompute merged 1 commit intomainfrom
kporter/seal-aggregator-metrics

Conversation

@quepcompute
Copy link
Collaborator

Description

The aggregator server creates a prometheus registry and pushes metrics via spawn_metrics_push_job, but never starts an HTTP server to serve /metrics. This means grafana-alloy (which discovers pods via prometheus.io/scrape: "true" annotations) tries to scrape pod_ip:9184/metrics but nothing is listening, resulting in up=0.

This adds start_basic_prometheus_server() to bind a prometheus HTTP server on 0.0.0.0:9184, matching what the key server already does. Both push and pull metrics now work.

Test Plan

  • cargo check --bin aggregator-server passes
  • Deploy to testnet and verify up{namespace="seal-aggregator-testnet"} == 1 in Grafana
  • Verify /metrics endpoint responds: curl <pod_ip>:9184/metrics

@quepcompute quepcompute force-pushed the kporter/seal-aggregator-metrics branch from 8afafa9 to 08dfc66 Compare March 12, 2026 21:12
@quepcompute quepcompute merged commit 3c6ce5a into main Mar 12, 2026
10 checks passed
@quepcompute quepcompute deleted the kporter/seal-aggregator-metrics branch March 12, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants