Created
June 26, 2024 06:33
-
-
Save zettalyst/b3d6af87d2ecf5b6fcc1c706ab7cf4dd to your computer and use it in GitHub Desktop.
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:v2.52.0 | |
| volumes: | |
| - ./prometheus.yml:/etc/prometheus/prometheus.yml | |
| command: | |
| - '--config.file=/etc/prometheus/prometheus.yml' | |
| ports: | |
| - '9090:9090' | |
| node_exporter: | |
| image: prom/node-exporter:v1.8.0 | |
| volumes: | |
| - /proc:/host/proc:ro | |
| - /sys:/host/sys:ro | |
| - /:/rootfs:ro | |
| command: | |
| - '--path.procfs=/host/proc' | |
| - '--path.rootfs=/rootfs' | |
| - '--path.sysfs=/host/sys' | |
| - '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)' | |
| ports: | |
| - '9100:9100' | |
| grafana: | |
| image: grafana/grafana-oss:10.4.2 | |
| environment: | |
| - GF_SECURITY_ADMIN_PASSWORD=admin # Set the admin password | |
| - GF_USERS_ALLOW_SIGN_UP=false | |
| ports: | |
| - '3000:3000' | |
| depends_on: | |
| - 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
| global: | |
| scrape_interval: 15s | |
| scrape_configs: | |
| - job_name: 'prometheus' # prometheus | |
| static_configs: | |
| - targets: ['localhost:9090'] | |
| - job_name: 'node' # 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