Prometheus란?? 시계열(Time Series) 데이터베이스 기반 모니터링 시스템
[root@zoomoney opt]# tree
.
├── grafana
│ ├── Containerfile
│ └── provisioning
│ ├── dashborads
│ └── datasources
└── prometheus
├── Containerfile
└── prometheus.yml
<Prometheus연동>
1.prometheus 디렉토리 이동후
buildah bud -t prometheus:v1 . 명령어 수행
<빌드된 컨테이너 이미지 확인>
[root@zoomoney opt]# podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/prometheus v1 9290fb8f4fad 24 hours ago 303 MB
<Container 이미지 기동>
podman run -d --name prometheus_v1 --pod zoomoney_pro localhost/prometheus:v1
<Grafana 연동>
1.grafana 디렉토리 이동후
buildah bud -t grafana:v1 . 명령어 수행
<빌드된 컨테이너 이미지 확인>
[root@zoomoney ~]# podimg
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/prometheus v1 9290fb8f4fad 24 hours ago 303 MB
localhost/backend v1 163c2883438f 24 hours ago 573 MB
localhost/grafana v1 2d2ae498da92 29 hours ago 671 MB
<Container 이미지 기동>
podman run -d --name grafana_v1 --pod zoomoney_pro localhost/grafana:v1
<Container 확인>
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES POD ID PODNAME
2365106ac006 localhost/grafana:v1 24 hours ago Up 24 hours 0.0.0.0:80->80/tcp, 0.0.0.0:7777->7777/tcp, 0.0.0.0:9091->9090/tcp, 0.0.0.0:33000->3000/tcp, 3000/tcp grafana_v1 89a757316fa5 zoomoney_pro
005a100371c9 localhost/prometheus:v1 --config.file=/et... 24 hours ago Up 24 hours 0.0.0.0:80->80/tcp, 0.0.0.0:7777->7777/tcp, 0.0.0.0:9091->9090/tcp, 0.0.0.0:33000->3000/tcp, 9090/tcp prometheus_v1 89a757316fa5 zoomoney_pro
<접속확인>
1.Grafana 접속 확인
2. Prometheus 가 Zoomoney 프로젝트 엔드포인트에 매트릭스를 수집하는지 Curl 명령어로 확인 결과
[root@zoomoney ~]# curl http://192.168.0.174:7777/zoomoney/actuator/prometheus
# HELP application_ready_time_seconds Time taken for the application to be ready to service requests
# TYPE application_ready_time_seconds gauge
application_ready_time_seconds{main_application_class="com.shinhan.zoomoney.ZooMoneyBackEndApplication"} 10.454
# HELP application_started_time_seconds Time taken to start the application
# TYPE application_started_time_seconds gauge
application_started_time_seconds{main_application_class="com.shinhan.zoomoney.ZooMoneyBackEndApplication"} 10.359
# HELP disk_free_bytes Usable space for path
# TYPE disk_free_bytes gauge
disk_free_bytes{path="/."} 2.43263488E9
# HELP disk_total_bytes Total space for path
# TYPE disk_total_bytes gauge
disk_total_bytes{path="/."} 1.1416895488E10
# HELP executor_active_threads The approximate number of threads that are actively executing tasks
# TYPE executor_active_threads gauge
executor_active_threads{name="applicationTaskExecutor"} 0.0
# HELP executor_completed_tasks_total The approximate total number of tasks that have completed execution
# TYPE executor_completed_tasks_total counter
executor_completed_tasks_total{name="applicationTaskExecutor"} 0.0
# HELP executor_pool_core_threads The core number of threads for the pool
# TYPE executor_pool_core_threads gauge
executor_pool_core_threads{name="applicationTaskExecutor"} 8.0
# HELP executor_pool_max_threads The maximum allowed number of threads in the pool
# TYPE executor_pool_max_threads gauge
executor_pool_max_threads{name="applicationTaskExecutor"} 2.147483647E9
# HELP executor_pool_size_threads The current number of threads in the pool
# TYPE executor_pool_size_threads gauge
executor_pool_size_threads{name="applicationTaskExecutor"} 0.0
# HELP executor_queue_remaining_tasks The number of additional elements that this queue can ideally accept without blocking
# TYPE executor_queue_remaining_tasks gauge
... 생략...
<Grafana 대쉬보드 구성>
'Cloud' 카테고리의 다른 글
Jenkins (0) | 2025.04.22 |
---|---|
Docker 와 Podman 차이 (0) | 2025.03.23 |
Podman 으로 Zoomoney 프로젝트 배포하기 (0) | 2025.03.22 |
Skopeo (0) | 2025.01.21 |
Dev-Ops (0) | 2025.01.20 |