Skip to content

Commit

Permalink
ADD: cadvisor to prometheus datasource
Browse files Browse the repository at this point in the history
  • Loading branch information
wiemanboy committed Jan 19, 2025
1 parent f25d118 commit 2fd0cf7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
6 changes: 5 additions & 1 deletion prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ scrape_configs:

- job_name: 'node'
static_configs:
- targets: [ 'node-exporter:9100' ]
- targets: [ 'node-exporter:9100' ]

- job_name: 'cadvisor'
static_configs:
- targets: [ 'cadvisor:8080' ]
17 changes: 16 additions & 1 deletion swarm-compose.reverse-proxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,26 @@ services:

node-exporter:
networks:
- reverse_proxy_network
- logging_network
image: prom/node-exporter

cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
networks:
- logging_network
ports:
- ":8080"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro

prometheus:
image: prom/prometheus
networks:
- reverse_proxy_network
- logging_network
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
Expand All @@ -90,6 +103,7 @@ services:
image: grafana/grafana
networks:
- reverse_proxy_network
- logging_network
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
Expand All @@ -104,6 +118,7 @@ services:
networks:
reverse_proxy_network:
external: true
logging_network:

secrets:
traefik_users:
Expand Down

0 comments on commit 2fd0cf7

Please sign in to comment.