metrics: Prometheus endpoint on its own --metrics listener; the pod exposes it inside the cluster only
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
@@ -76,6 +76,14 @@ so:
|
||||
new node is up. If you would rather have a renewable identity, create it once
|
||||
by hand with a phrase (`allmende init`, without `--no-phrase`) on the volume
|
||||
before the first start.
|
||||
- **Metrics.** The node serves Prometheus metrics on container port 9090
|
||||
(`--metrics`): peers (and peers per region), listings held, gossip dropped or
|
||||
rejected, peers banned, sync and connections refused, and Go memory. They show
|
||||
whether the node is being attacked or running short of memory. The port has no
|
||||
login and no Service or IngressRoute points to it, so only things inside the
|
||||
cluster can reach it; keep it that way. Scrape it with a PodMonitor
|
||||
(`port: metrics`) or `kubectl -n allmende port-forward allmende-0 9090:9090`
|
||||
and `curl localhost:9090/metrics`. Counters start at zero on every restart.
|
||||
- **One replica only.** A second pod would be a second node with its own
|
||||
identity, not a copy.
|
||||
- **No sign-in link in the log.** `allmende run` normally prints the owner
|
||||
|
||||
@@ -52,6 +52,7 @@ spec:
|
||||
--no-login-link \
|
||||
--difficulty "${DIFFICULTY:-24}" \
|
||||
--http 0.0.0.0:8080 \
|
||||
--metrics 0.0.0.0:9090 \
|
||||
--listen /ip4/0.0.0.0/tcp/4001 \
|
||||
--listen /ip4/0.0.0.0/udp/4001/quic-v1 \
|
||||
--announce "/dns4/${PUBLIC_HOST}/tcp/${PUBLIC_PORT}" \
|
||||
@@ -88,6 +89,12 @@ spec:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
# Prometheus metrics. No Service or IngressRoute points here, so the
|
||||
# port is reachable only inside the cluster (by pod IP); it has no
|
||||
# login. Scrape it with a PodMonitor or a pod annotation.
|
||||
- name: metrics
|
||||
containerPort: 9090
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/v1/status
|
||||
|
||||
Reference in New Issue
Block a user