모니터링(Grafana, Prometheus)/Prometheus

Prometheus 이슈 및 troubleshooting

babbeolicoding 2023. 5. 4. 22:08

1. pod로 기동한 prometheus-node-exporter가 제대로 올라오지 않을 때

woeker node에 수동으로 node_exporter가 깔려 있고 
pod로 node_exporter를 실행하려고 하면 에러가 발생하기도 함

 

2. err="open /data/queries.active: permission denied"

- 아래 설정 수정 후 prometheus-server 재기동 필요

err="open /data/queries.active: permission denied" 오류 발생

prometheus-server deploy 수정필요
kubectl edit deploy prometheus-server -n prometheus

#helm으로 prometheus를 설치하면 아래 처럼 기본 세팅이 되어있다
   securityContext:
     fsGroup: 65534
     runAsGroup: 65534
     runAsNonRoot: true
     runAsUser: 65534
   
#이렇게 바꾸면 됨   
    securityContext:
    fsGroup: 0
    runAsGroup: 0
    runAsUser: 0

 

3. prometheus-server pod mem 상승(component=tsdb msg="compaction failed" err="compact head: persist head block: populate block: add series: out-of-order series added with label set)

- pod log를 확인하면 아래와 같은 메시지 발생하면서 mem가 계속 상승하는 경우가 있음

component=tsdb msg="compaction failed" err="compact head: persist head block: populate block: add series: out-of-order series added with label set


네트워크로 연결된 드라이브를 사용하면 위와 같은 오류가 계속 발생하면서 
mem가 계속 증가하는 경우가 있음.
pv로 연결되어 있는 폴더 전체 삭제 후 재기동 하면 오류 해결

 

4. prometheus deployment를 수정하고 난 뒤 pod가 정상적으로 올라오지 않을 때(lock db directory resource temporarily unavailable)

- lock db directory resource temporarily unavailable 오류 발생

- pv에 연결되어 있는 prometheus data file에서 lock 파일만 삭제하면 정상 기동

 

5. 용량이 꽉 찼을 때

- no space left on device

- 용량 정리필요