diff --git a/asset/prometheus/quantus-rules.yml b/asset/prometheus/quantus-rules.yml index f71c40d..a0fc2ed 100644 --- a/asset/prometheus/quantus-rules.yml +++ b/asset/prometheus/quantus-rules.yml @@ -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.