Skip to content

Commit

Permalink
Add node exporter for metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
kysre committed Feb 11, 2024
1 parent 44a6b9d commit 50a15af
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
10 changes: 9 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ services:
resources:
limits:
cpus: '0.2'
memory: 200M
memory: 300M

node_exporter:
image: prom/node-exporter:latest
deploy:
resources:
limits:
cpus: '0.1'
memory: 100M

grafana:
image: grafana/grafana
Expand Down
3 changes: 2 additions & 1 deletion prometheus/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ alerting:
scrape_configs:
- job_name: prometheus
honor_timestamps: true
scrape_interval: 15s
scrape_interval: 5s
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets: ['node_exporter:9100']
- targets: ['leader_0:9000']
- targets: ['leader_1:9000']
- targets: ['datanode_0:9000']
Expand Down
3 changes: 3 additions & 0 deletions test.docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ services:
- ./prometheus:/etc/prometheus
- prom_data:/prometheus

node_exporter:
image: prom/node-exporter:latest

grafana:
image: grafana/grafana
container_name: grafana
Expand Down

0 comments on commit 50a15af

Please sign in to comment.