Merge pull request 'rules: derive the short hostname so the GPU join matches node-exporter' (#8) from metrics/rules-host-label into main
deploy / fetch (push) Successful in 21s
deploy / deploy-node (bob.hanzalova.internal, 0x134e73f06fa9bdb1dbfa909e149c563f5860ceb71a0e7307918f7033970edf59, benjy.hanzalova.internal quadbrat.hanzalova.internal, --public-addr /dns4/nh.thgttg.com/tcp/30333, --unsafe-rpc-external --rpc-methods safe --rpc-c… (push) Successful in 36s
deploy / deploy-metrics (push) Successful in 11s

This commit was merged in pull request #8.
This commit is contained in:
2026-09-03 11:24:11 +00:00
+5 -3
View File
@@ -2,8 +2,10 @@
# /etc/prometheus/rules.d/quantus.yml on the metrics host (quantus/miner#9).
#
# The miner's series (job quantus-miner, instance host:9900) and the GPU
# series from node-exporter's textfile collector (job node, `host` label) are
# joined on a derived `host` and on `device` (the miner's engine index) =
# series from node-exporter's textfile collector (job node, `host` label, the
# SHORT hostname as cichlid's inventory sets it) are joined on `host` derived
# as the first DNS label of the miner's instance, and on `device` (the miner's
# engine index) =
# `gpu` (nvidia-smi index). On single-card hosts both are 0; on a multi-card
# host the engine orders adapters discrete-first as Vulkan enumerates them,
# which is expected to match nvidia-smi's order but is not guaranteed.
@@ -13,7 +15,7 @@ groups:
rules:
# Per-device throughput, keyed so it can be joined with the GPU series.
- record: quantus:device_hashrate:rate5m
expr: label_replace(rate(miner_device_hashes_total[5m]), "host", "$1", "instance", "([^:]+):.*")
expr: label_replace(rate(miner_device_hashes_total[5m]), "host", "$1", "instance", "([^.:]+).*")
# The same, carrying the build that produced it. The series set changes
# on every deploy, which is the annotation the dashboard draws.