반응형

k3s 에 grafana 와 prometheus 가 설치되어 있어야 함.

prometheus 확인

kubectl get svc -n mon | grep prometheus-server
prometheus-server                     ClusterIP   10.43.198.90    <none>        80/TCP         32m

 

연결

Grafana 에서 Add new connection  => prometheus 클릭

Add new data source 클릭

Connection 항목에 prometheus 정보 입력
서비스 이름을 입력해도 되고 서비스 IP 를 입력해도 됨, 맨 위에서 서비스를 조회했던 IP 를 사용한다.

http://prometheus-server.mon.svc.cluster.local:80

http://10.43.198.90:80

입력 후 Save & test 클릭 시 아래와 같이 나오면 정상 연결

 

조회

Explore -> prometheus 클릭 후 매트릭에 대한 query 를 수행하면 prometheus 가 수집한 정보가 표시됨.

 

반응형