Skip to content

Commit

Permalink
[ci] mysql exporter 수정
Browse files Browse the repository at this point in the history
mysql exporter 수정
  • Loading branch information
YeaChan05 committed Jun 6, 2024
1 parent c446972 commit dfa675f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 10 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,20 @@ services:
restart: always
ports:
- "6379:6379"
volumes:
- redis-data:/data

prometheus:
image: prom/prometheus
container_name: prometheus
restart: always
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
ports:
- "9090:9090"
extra_hosts:
- "host.docker.internal:host-gateway"

grafana:
image: grafana/grafana
Expand All @@ -80,12 +86,14 @@ services:
- grafana-storage:/var/lib/grafana

mysqld_exporter:
image: prom/mysqld_exporter
image: prom/mysqld-exporter
restart: always
environment:
- DATA_SOURCE_NAME=${MYSQL_USERNAME}:${MYSQL_PASSWORD}@tcp(${MYSQL_HOST})/
ports:
- "9104:9104"

volumes:
grafana-storage:
grafana-storage:
prometheus-data:
redis-data:
3 changes: 2 additions & 1 deletion prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ scrape_configs:
- job_name: 'spring-boot-apps'
static_configs:
- targets: ['app1:8080', 'app2:8080', 'app3:8080']
metrics_path: '/actuator/prometheus'

- job_name: 'mysql'
static_configs:
- targets: ['mysqld_exporter:9104']
- targets: ['mysqld_exporter:9104']

0 comments on commit dfa675f

Please sign in to comment.