prometheus-scrape.metrics_path was '/' which made prometheus-docker-sd scrape the HTML root and fail with 'INVALID is not a valid start token', leaving the targets up=0. Fixes per-container (cadvisor) + host (node_exporter) metrics so they can be wired into the DRPC insights MCP for per-node resource attribution. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
25 lines
704 B
YAML
25 lines
704 B
YAML
services:
|
|
nodeexporter:
|
|
image: prom/node-exporter:v1.3.1
|
|
container_name: nodeexporter
|
|
volumes:
|
|
- /proc:/host/proc:ro
|
|
- /sys:/host/sys:ro
|
|
- /:/rootfs:ro
|
|
command:
|
|
- '--path.procfs=/host/proc'
|
|
- '--path.rootfs=/rootfs'
|
|
- '--path.sysfs=/host/sys'
|
|
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
|
|
restart: unless-stopped
|
|
expose:
|
|
- 9100
|
|
labels:
|
|
- "prometheus-scrape.enabled=true"
|
|
- "prometheus-scrape.port=9100"
|
|
- "prometheus-scrape.job_name=nodeexporter"
|
|
- "prometheus-scrape.metrics_path=/metrics"
|
|
- "org.label-schema.group=monitoring"
|
|
networks:
|
|
- monitoring
|