Repository navigation
Conversation
…rafana, with alerts, from a read-only token Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
…t the token's id Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA
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.
Summary
The Proxmox node's CPU, memory and storages in Grafana, with alerts, from an optional read-only token (#94). Nothing is installed on the node.
internal/credentials:proxmoxMonitorToken(URBEX_PROXMOX_MONITOR_TOKEN),user@realm!name=secret. It is user-provided, so teardown keeps it.platform/stacks/observability/compose.yaml:pve-exporter(prompve/prometheus-pve-exporter:3.12.0, pinned by digest), labelsplatform/pve-exporter, in the compose profilepve:PVE_USER,PVE_TOKEN_NAME,PVE_TOKEN_VALUE);pve-node, throughextra_hostswith the node's IP from the Stack's environment.platform/stacks/observability/prometheus.yml: apvejob (/pve?target=pve-node&cluster=1&node=1, every 60 s).dns_sd_configs): without the token the container doesn't exist, the name doesn't resolve, and there is no target, rather than a down one.metric_relabel_configskeep onlyid=~"(node|storage)/.+": never the guests, which thePVEAuditortoken can see.internal/bootstrap/stacks.go:COMPOSE_PROFILES=pveandURBEX_PVE_NODE_IPin its Komodo environment (.env), the token's parts in its secrets, andPVE_VERIFY_SSL=false;PlatformStack.Environmentis passed to Komodo.TLS: the exporter doesn't verify the node's certificate. It reaches the node under another name, and Proxmox's own certificate is self-signed; the token only reads. Stated in the docs.
internal/platform/catalog.go:pve-exporter, kindplatform, on the observability LXC, outbound only: it publishes nothing on the LXC.Grafana:
urbex-resources.ymlgets three rules, allkind: platform, service: proxmox, withnode/storagelabels: node memory above 90% for 10 min (warning), a storage above 85% (warning) or 95% (critical) for 5 min.internal/doctor/nodemetrics.go:urbex doctor's node metrics:pveumprints it on its own line: the lab's first run hit this), if Proxmox refuses it, or if it lacksSys.Audit/Datastore.Auditon/;CHANGELOG.md: under Unreleased.Companion: urbforge/urbex#104.
Why
#94: the LXCs' metrics don't show the node. On Cubotto the node peaked at 9.26 of 15.6 GiB while urbex's LXCs used about 4. urbex's pool-scoped token gets 403 on the node.
Tests I ran
mise run test,mise run lint: pass. New tests:SplitProxmoxToken;mise run e2e: passed, 24 steps (no token: the exporter stays off and everything works as before).promtool check configon the Prometheus config; the seven new PromQL expressions (alerts and panels) parse (promtool check rules).docker compose config(docker 29.9.3) with the Stack's env file:COMPOSE_PROFILES=pveaddspve-exporterwithpve-node=<ip>, an empty one leaves it out. The metric names andidformats were checked in the exporter's source.lab-cubotto/nodemetrics-test.sh), with aPVEAuditortoken Teg created as root:urbex doctor:ok node metrics;urbex bootstrap: 169 s;node/cubotto,storage/cubotto/local,storage/cubotto/local-zfs,storage/cubotto/wall-nfs, and no guest;urbex bootstrapchanged nothing.Checklist before review
urbex.kind/urbex.serviceFixes #94
🤖 Generated with Claude Code
https://claude.ai/code/session_0182yxsfwRowwnxCfgrQwjnA