Created
January 20, 2025 08:15
-
-
Save hunzo/e19642ec0a8bb33fdb7ecb17a9f32502 to your computer and use it in GitHub Desktop.
docker prometheus
This file contains hidden or 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 | |
container_name: prometheus | |
volumes: | |
- ./prometheus.yml:/etc/prometheus/prometheus.yml | |
environment: | |
- TZ=Asia/Bangkok | |
networks: | |
- net | |
cadvisor: | |
image: gcr.io/cadvisor/cadvisor:latest | |
container_name: cadvisor | |
volumes: | |
- /:/rootfs:ro | |
- /var/run:/var/run:ro | |
- /sys:/sys:ro | |
- /var/lib/docker/:/var/lib/docker:ro | |
- /cgroup:/cgroup:ro | |
networks: | |
- net | |
node_exporter: | |
image: prom/node-exporter:latest | |
container_name: node_exporter | |
environment: | |
- TZ=Asia/Bangkok | |
restart: always | |
networks: | |
- net | |
grafana: | |
image: grafana/grafana | |
container_name: grafana | |
environment: | |
- GF_SECURITY_ADMIN_PASSWORD=admin | |
- TZ=Asia/Bangkok | |
ports: | |
- "3000:3000" | |
networks: | |
- net | |
networks: | |
net: |
This file contains hidden or 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: "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