Last active
June 25, 2024 07:58
-
-
Save azole/0dc3027a9926392b4f63811b3900b77f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
prometheus: | |
image: prom/prometheus:latest | |
container_name: prometheus | |
volumes: | |
- ./prometheus.yml:/etc/prometheus/prometheus.yml | |
- prometheus_data:/prometheus | |
ports: | |
- "9090:9090" | |
grafana: | |
image: grafana/grafana:latest | |
container_name: grafana | |
ports: | |
- "3000:3000" | |
volumes: | |
- grafana_data:/var/lib/grafana | |
environment: | |
- GF_SECURITY_ADMIN_PASSWORD=admin | |
#- GF_SMTP_ENABLED=true | |
#- GF_SMTP_HOST=smtp.gmail.com:587 | |
#- GF_SMTP_USER={your email} | |
#- GF_SMTP_PASSWORD={your password} | |
#- GF_SMTP_SKIP_VERIFY=true | |
#- GF_SMTP_FROM_ADDRESS={your email} | |
#- GF_SMTP_FROM_NAME={your email name} | |
cadvisor: | |
image: gcr.io/cadvisor/cadvisor:latest | |
container_name: cadvisor | |
ports: | |
- "8080:8080" | |
volumes: | |
- /:/rootfs:ro | |
- /var/run:/var/run:ro | |
- /sys:/sys:ro | |
- /var/lib/docker/:/var/lib/docker:ro | |
node_exporter: | |
image: prom/node-exporter:latest | |
container_name: node_exporter | |
ports: | |
- "9100:9100" | |
volumes: | |
- /proc:/host/proc:ro | |
- /sys:/host/sys:ro | |
- /:/rootfs:ro | |
command: | |
- '--path.procfs=/host/proc' | |
- '--path.sysfs=/host/sys' | |
- '--collector.filesystem.ignored-mount-points="^/(sys|proc|dev|host|etc)($$|/)"' | |
volumes: | |
prometheus_data: | |
grafana_data: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global: | |
scrape_interval: 15s | |
scrape_configs: | |
- job_name: 'prometheus' | |
static_configs: | |
- targets: ['localhost:9090'] | |
- job_name: 'cadvisor' | |
static_configs: | |
- targets: ['cadvisor:8080'] | |
- job_name: 'node_exporter' | |
static_configs: | |
- targets: ['node_exporter:9100'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment