Skip to content

Commit

Permalink
[#1] Update: cadvisor
Browse files Browse the repository at this point in the history
  • Loading branch information
jiooum committed Sep 23, 2024
1 parent d098ec4 commit 53fac6d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ jobs:
deploy:
runs-on: self-hosted
steps:
- name: deploy all services
run: docker compose -f system_monitoring/docker-compose.yml up -d
- name: deploy prometheus
run: docker compose -f system_monitoring/docker-compose.yml up prometheus -d
run: docker compose -f system_monitoring/docker-compose.yml restart prometheus -d
- name: stop grafana
run: docker compose -f system_monitoring/docker-compose.yml down grafana
- name: deploy grafana
Expand Down
7 changes: 7 additions & 0 deletions system_monitoring/config/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ scrape_configs:
- job_name: 'nvidia-dcgm-exporter'
static_configs:
- targets: ['192.168.194.2:9400', '192.168.194.37:9400']

- job_name: cadvisor
scrape_interval: 5s
static_configs:
- targets:
- 192.168.194.2:8080
- 192.168.194.37:8080
21 changes: 21 additions & 0 deletions system_monitoring/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,27 @@ services:
- "9400:9400"
networks:
- prometheus-network
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: pz_cadvisor
ports:
- "8080:8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
depends_on:
- redis
networks:
- prometheus-network
redis:
image: redis:latest
container_name: pz_redis
ports:
- "6379:6379"
networks:
- prometheus-network

networks:
prometheus-network:
Expand Down

0 comments on commit 53fac6d

Please sign in to comment.