문서에는 influxDB 1.x 버전으로 작성되어 있다.
2.x 버전은 기본적으로 gui가 제공된다. 나중에 바꾸자
version: "3.7"
services:
influxdb:
image: influxdb:1.8
# image: bitnami/influxdb:2.0.7
container_name: influxdb
ports:
- 8086:8086
- 8085:8088
environment:
- INFLUXDB_ADMIN_USER_PASSWORD=admin
- INFLUXDB_ADMIN_USER_TOKEN=admintoken123
- INFLUXDB_USER=geth
- INFLUXDB_USER_PASSWORD=geth1234gethgeth
- INFLUXDB_HTTP_AUTH_ENABLED=false
- INFLUXDB_DB=my_database
volumes:
- influxdb_data:/bitnami/influxdb
volumes:
influxdb_data:
version: '3'
services:
grafana:
image: grafana/grafana
ports:
- 3000:3000
volumes:
- ./data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
user: "${UID}:${GID}" // 설정 안하면 권한 문제로 내부 디렉토리가 mount 안됨.
version: '3'
services:
prometheus:
image: prom/prometheus
ports:
- 9090:9090
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
global:
scrape_interval: 15s
evaluation_interval: 15s
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- 'record.geth.rules.yml'
# A scrape configuration containing exactly one endpoint to scrape.
scrape_configs:
- job_name: 'go-ethereum'
scrape_interval: 10s
metrics_path: /debug/metrics/prometheus
static_configs:
- targets:
- '127.0.0.1:6060'
labels:
chain: ethereum
위 도커 셋다 실행 후 프로메테우스 포트로 접근하면 gui 페이지 확인 가능.
초기 아이디 비밀번호는 admin
프로메테우스에서 제공하는 geth 대시보드를 import 해서 사용하자.
https://grafana.com/grafana/dashboards/13877-single-geth-dashboard/
알림도 된다고 한다. 나중에 해본다.
덕분에 좋은 정보 얻어갑니다, 감사합니다.