위는 강사님이 설명해주신 흐름을 간단히 정리한 구조도입니다.
우선 아래 링크에 들어가 프로메테우스를 설치 받습니다.
https://prometheus.io/download/
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-prometheus'
그 후 git bash로 다운받은 프로메테우스가 있는 경로로 이동 후에
./prometheus.exe --config.file=prometheus.yml 명령어로 prometheus 서버를 실행하여줍니다.
설치가 끝나면 http://localhost:9090 로 접속해봅니다.
설정 후 prometheus 서버를 재가동 후에 http://localhost:9090/targets에 접속 시 아래와 같다면 OK
이제 prometheus는 OK입니다. 다음 GRAFANA로 넘어가겠습니다.
https://grafana.com/grafana/download
로그인하여 들어온 후에 좌측에 Connections > Add a new connection로 들어와 prometheus를 선택하여 줍니다.
다른 값을 모두 기본 값으로 두고 URL : http://localhost:9090으로 넣어준 후 저장하여 줍니다.
마지막으로 대시보드를 생성한 후에 보고 싶은 시각화 타입을 고르고 조회를 원하는 Metrics 필드를 선택한 후에 Run queries 버튼을 누르면 끝입니다.
좋은 글 잘 읽었습니다! 자세하게 설명되어 있어 좋네요