Repository navigation
Fix Erigon metrics port so Prometheus scraping works - #98
Merged
Merged
Conversation
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>
mjkeating
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix Erigon metrics port so Prometheus scraping works
Problem
EthPillar starts Erigon with
--metrics --pprofbut no--metrics.port. In Erigon,--metrics.portdefaults to 6061 (diagnostics/metrics/config.go, registered viacmd/utils/flags.go), while--pprof.portdefaults 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 on127.0.0.1:6061.manage/client_monitoring.pyscrapes Erigon at127.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=6060to both Erigon argument lists indeploy/erigon.py(integrated and standalone). With metrics and pprof on the same address, Erigon serves/debug/metrics/prometheusand/debug/pprof/*from one server on 6060, which matches what EthPillar already scrapes.--http.apiis unchanged.Existing installs pick this up when the unit is regenerated (
manage/config_compare.pyuses the same generators).update_execution.sh/functions.shonly replace the binary and need no change.