Files
homelab-infra/platform/observability/metrics/scrapes/docker-hosts.yaml
T
2026-09-25 17:21:45 +00:00

23 lines
817 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 仅抓取已存在的宿主机 node-exporter。旧 :8080 目标实际返回 nginx 404,
# 独立 Docker cAdvisor 尚未部署;部署并确认端口后再添加其目标。
# Kubernetes 容器指标由 kubelet.yaml 的 /metrics/cadvisor 独立采集。
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMStaticScrape
metadata:
name: docker-hosts
namespace: monitoring
labels:
app.kubernetes.io/part-of: victoria-metrics
spec:
jobName: docker-hosts
targetEndpoints:
# --- docker-01 (192.168.10.127) ---
- targets:
- "192.168.10.127:9100"
labels:
job: node-exporter
host: docker-01
# --- 新增主机前确认 exporter 已部署且 /metrics 返回成功 ---
# - targets: ["192.168.10.x:9100"]
# labels: { job: node-exporter, host: docker-02 }