Repository navigation
Turn on ipfs-cluster's Prometheus metrics on the content node - #9
Merged
Merged
Conversation
ipfs-cluster can report how many pins the cluster holds, how many are in pin_error, and how many are queued or pinning. kubo cannot: it knows what it holds, not what the cluster wants it to hold. They are off by default. CLUSTER_METRICS_ENABLESTATS turns them on, served on 127.0.0.1:8888 (the default, set explicitly), which #8 reserved and the metrics proxy in ipni/infra scrapes. Loopback only, like every other API of the content node. The env var name and the default endpoint are from ipfs-cluster's observations/config.go; the running service.json shows the same endpoint with enable_stats false. Takes effect with content.yml, which restarts the content pod one box at a time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
Sets
CLUSTER_METRICS_ENABLESTATS=true(and, explicitly, the defaultCLUSTER_METRICS_PROMETHEUSENDPOINT=/ip4/127.0.0.1/tcp/8888) on the content node's ipfs-cluster container. 8888 was reserved in #8. Loopback only, like every other API of the content node.The env var name and default endpoint come from ipfs-cluster's
observations/config.go. The runningservice.jsonon chic1 already hasprometheus_endpoint: /ip4/127.0.0.1/tcp/8888withenable_stats: false.Why
ipfs-cluster can report what kubo can't: how many pins the cluster holds (
ipfscluster_pins), how many are inpin_error, queued or pinning. kubo knows what it holds, not what the cluster wants it to hold. ipni/infra's metrics proxy already has the route (/content/cluster→127.0.0.1:8888/metrics); the scrape and alerts follow once this is rolled out and the metric names are confirmed live.Also adds 8888 to the README's port table and
roles/content/defaults/main.yml.Rollout
Not applied by CI. CI runs only
site.ymlandplatform.yml; this needscontent.yml, which restarts the content pod (kubo and ipfs-cluster) one box at a time underproduction_rollout:Check afterwards:
🤖 Generated with Claude Code