DevOps

[Dcoker] Zipkin, Monitoring(Prometheus + Grafana) Container Create Example

차노도리 2023. 5. 31. 00:13

Zipkin

https://zipkin.io/pages/quickstart

 

Quickstart · OpenZipkin

Quickstart In this section we’ll walk through building and starting an instance of Zipkin for checking out Zipkin locally. There are three options: using Java, Docker or running from source. If you are familiar with Docker, this is the preferred method t

zipkin.io

 

컨테이너 생성

docker run -d -p 9411:9411 --network gugbab-network --name zipkin openzipkin/zipkin

 

Prometheus

https://prometheus.io/download/

 

Download | Prometheus

An open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.

prometheus.io

https://hub.docker.com/r/prom/prometheus

 

Docker

 

hub.docker.com

 

볼륨으로 가져갈 설정파일 수정

...
scrape_configs:
  - job_name: "prometheus"

    static_configs:
      - targets: ["prometheus:9090"]	# docker컨테이너에 올라갈 이름
  - job_name: "gugbab-api-gateway"
    scrape_interval: 15s  # 간격 설정
    metrics_path: "/actuator/prometheus" # 어디에 수집된 데이터를 시계열 데이토 바꿀지
    static_configs: # 서버 설정
      - targets: ["api-gateway:7501"]	# docker컨테이너에 올라갈 이름      
...

컨테이너 생성

docker run -d -p 9090:9090 --network gugbab-network --name prometheus -v /Users/puk0806/Prometheus/prometheus-2.44.0-rc.2.darwin-amd64/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus

 

 

Grafana

https://grafana.com/grafana/download?pg=get&plcmt=selfmanaged-box1-cta1&platform=docker 

 

Download Grafana | Grafana Labs

Overview of how to download and install different versions of Grafana on different operating systems.

grafana.com

 

컨테이너 생성

docker run -d -p 3000:3000 --network gugbab-network --name grafana grafana/grafana