Co-authored-by: panxiao81 <[email protected]>
This commit was merged in pull request #148.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# Pull metrics from Docker hosts running ../../docker-hosts/compose.yaml.
|
# 仅抓取已存在的宿主机 node-exporter。旧 :8080 目标实际返回 nginx 404,
|
||||||
# vmagent scrapes each host's node-exporter (:9100) and cAdvisor (:8080) over the LAN.
|
# 独立 Docker cAdvisor 尚未部署;部署并确认端口后再添加其目标。
|
||||||
# Add one target block per host; keep the `host` label in sync with its HOST_LABEL.
|
# Kubernetes 容器指标由 kubelet.yaml 的 /metrics/cadvisor 独立采集。
|
||||||
apiVersion: operator.victoriametrics.com/v1beta1
|
apiVersion: operator.victoriametrics.com/v1beta1
|
||||||
kind: VMStaticScrape
|
kind: VMStaticScrape
|
||||||
metadata:
|
metadata:
|
||||||
@@ -17,13 +17,6 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
job: node-exporter
|
job: node-exporter
|
||||||
host: docker-01
|
host: docker-01
|
||||||
- targets:
|
# --- 新增主机前确认 exporter 已部署且 /metrics 返回成功 ---
|
||||||
- "192.168.10.127:8080"
|
|
||||||
labels:
|
|
||||||
job: cadvisor
|
|
||||||
host: docker-01
|
|
||||||
# --- add more hosts below, mirroring the two blocks above ---
|
|
||||||
# - targets: ["192.168.10.x:9100"]
|
# - targets: ["192.168.10.x:9100"]
|
||||||
# labels: { job: node-exporter, host: docker-02 }
|
# labels: { job: node-exporter, host: docker-02 }
|
||||||
# - targets: ["192.168.10.x:8080"]
|
|
||||||
# labels: { job: cadvisor, host: docker-02 }
|
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ spec:
|
|||||||
honorLabels: true
|
honorLabels: true
|
||||||
honorTimestamps: false
|
honorTimestamps: false
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
# k3s 此端点包含 apiserver/etcd 指标,响应已超过默认 16 MiB。
|
||||||
|
# 仅放宽 kubelet 任务,其他采集目标保留默认限制。
|
||||||
|
max_scrape_size: "32MiB"
|
||||||
tlsConfig:
|
tlsConfig:
|
||||||
insecureSkipVerify: true
|
insecureSkipVerify: true
|
||||||
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||||
|
|||||||
Reference in New Issue
Block a user