Skip to content

Fix Erigon metrics port so Prometheus scraping works - #98

Merged
mjkeating merged 1 commit into
mjkeating:mainfrom
b0a7:cursor/erigon-metrics-port-6060
Oct 26, 2026
Merged

mjkeating merged 1 commit into
mjkeating:mainfrom
b0a7:cursor/erigon-metrics-port-6060

Conversation

@b0a7

@b0a7 b0a7 commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Fix Erigon metrics port so Prometheus scraping works

Problem

EthPillar starts Erigon with --metrics --pprof but no --metrics.port. In Erigon, --metrics.port defaults to 6061 (diagnostics/metrics/config.go, registered via cmd/utils/flags.go), while --pprof.port defaults to 6060. When the metrics and pprof addresses differ, Erigon runs two HTTP servers, and only the metrics server serves /debug/metrics/prometheus. So metrics are served on 127.0.0.1:6061.

manage/client_monitoring.py scrapes Erigon at 127.0.0.1:6060/debug/metrics/prometheus, which is the pprof-only server, so Erigon dashboards would get no data.

eth-docker fixed the same issue in ethstaker/eth-docker#2959.

Fix

Add --metrics.port=6060 to both Erigon argument lists in deploy/erigon.py (integrated and standalone). With metrics and pprof on the same address, Erigon serves /debug/metrics/prometheus and /debug/pprof/* from one server on 6060, which matches what EthPillar already scrapes. --http.api is unchanged.

Existing installs pick this up when the unit is regenerated (manage/config_compare.py uses the same generators). update_execution.sh / functions.sh only replace the binary and need no change.

Erigon v3.8.1 and current main default --metrics.port to 6061 while pprof
stays on 127.0.0.1:6060. The prometheus handler is served on 6060 only when
those listen addresses match. EthPillar scrapes /debug/metrics/prometheus
on 6060.

Co-authored-by: b0a7 <b0a7@users.noreply.github.com>
@b0a7
b0a7 requested a review from mjkeating October 26, 2026 00:06
@mjkeating
mjkeating merged commit a9fdffb into mjkeating:main Oct 26, 2026
2 checks passed
@b0a7
b0a7 deleted the cursor/erigon-metrics-port-6060 branch October 29, 2026 21:53
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.

3 participants