Skip to content

Commit

Permalink
Add local grafana+prometheus+node_exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
A committed Jun 8, 2024
1 parent b85cce1 commit f8dbed3
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
60 changes: 60 additions & 0 deletions docker/graphana-prometheus/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
version: "3.3"

networks:
monitoring:

volumes:
grafana_data:
prometheus_data:

services:
grafana:
image: grafana/grafana:10.4.0
restart: unless-stopped
environment:
GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER:-admin}
GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD:-changeme}
expose:
- 3000
ports:
- 5000:3000
volumes:
- grafana_data:/var/lib/grafana
networks:
- monitoring

prometheus:
image: prom/prometheus:v2.52.0
restart: unless-stopped
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
- '--web.enable-admin-api'
volumes:
- ./files/prometheus/etc/prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
ports:
- 5001:9090

networks:
- monitoring

node_exporter:
image: prom/node-exporter:v1.8.1
restart: unless-stopped

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)($$|/)'

networks:
- monitoring
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:9090"]

- job_name: node_exporter_emperor
static_configs:
- targets: ["node_exporter:9100"]

0 comments on commit f8dbed3

Please sign in to comment.