Skip to content

Commit cc195bf

Browse files
Yaminyamclaude
andauthored
feat(BA-5989): add node-exporter to halfstack observability profile (#11541)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 64dc855 commit cc195bf

5 files changed

Lines changed: 49 additions & 0 deletions

File tree

changes/11541.feature.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Add `node-exporter` to the halfstack `observability` profile so Prometheus
2+
automatically scrapes host-level metrics (CPU, memory, disk, network) in local
3+
dev environments.

configs/prometheus/prometheus-ha.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,7 @@ scrape_configs:
4040
static_configs:
4141
- targets:
4242
- backendai-half-db-exporter:9187
43+
- job_name: 'node-exporter'
44+
static_configs:
45+
- targets:
46+
- backendai-half-node-exporter:9100

configs/prometheus/prometheus.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ scrape_configs:
3838
static_configs:
3939
- targets:
4040
- backendai-half-db-exporter:9187
41+
- job_name: 'node-exporter'
42+
static_configs:
43+
- targets:
44+
- backendai-half-node-exporter:9100

docker-compose.halfstack-ha.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,25 @@ services:
7676
depends_on:
7777
- backendai-half-redis-node03
7878

79+
backendai-half-node-exporter:
80+
image: prom/node-exporter:v1.9.1
81+
profiles: ["observability"]
82+
restart: unless-stopped
83+
networks:
84+
- half
85+
pid: host
86+
command:
87+
- '--path.procfs=/host/proc'
88+
- '--path.sysfs=/host/sys'
89+
- '--path.rootfs=/host/root'
90+
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
91+
volumes:
92+
- /proc:/host/proc:ro
93+
- /sys:/host/sys:ro
94+
- /:/host/root:ro,rslave
95+
ports:
96+
- "9100:9100"
97+
7998
# Initial master is redis-node01.
8099
backendai-half-redis-node01:
81100
image: redis:7.2.11-alpine

docker-compose.halfstack-main.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,25 @@ services:
7878
ports:
7979
- "9121:9121"
8080

81+
backendai-half-node-exporter:
82+
image: prom/node-exporter:v1.9.1
83+
profiles: ["observability"]
84+
restart: unless-stopped
85+
networks:
86+
- half
87+
pid: host
88+
command:
89+
- '--path.procfs=/host/proc'
90+
- '--path.sysfs=/host/sys'
91+
- '--path.rootfs=/host/root'
92+
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
93+
volumes:
94+
- /proc:/host/proc:ro
95+
- /sys:/host/sys:ro
96+
- /:/host/root:ro,rslave
97+
ports:
98+
- "9100:9100"
99+
81100
backendai-half-etcd:
82101
image: quay.io/coreos/etcd:v3.5.14
83102
restart: unless-stopped

0 commit comments

Comments
 (0)