v-m: Scrape PiKVM metrics

PiKVM exports some rudimentary metrics, but requires authentication to
scrape them.  At the very least, this will provide alerting in case the
PiKVM systems go offline.
This commit is contained in:
2025-12-01 12:17:57 -06:00
parent 8032458ecc
commit 1fc1c5594e
2 changed files with 21 additions and 0 deletions

View File

@@ -513,3 +513,23 @@ scrape_configs:
target_label: instance
- target_label: __address__
replacement: blackbox-exporter:9115
- job_name: pikvm
scheme: https
metrics_path: /api/export/prometheus/metrics
tls_config:
ca_file: /run/dch-ca/dch-root-ca.crt
dns_sd_configs:
- names:
- pikvm-nvr2.mgmt.pyrocufflink.black
type: A
port: 443
basic_auth:
username: prometheus
password_file: /run/secrets/vmagent/pikvm.password
relabel_configs:
- source_labels: [__meta_dns_name, __meta_dns_srv_record_port]
separator: ':'
target_label: __address__
- source_labels: [__meta_dns_name]
target_label: instance