반응형
예를 들어 process-exporter에서 elasticsearch process를 health check를 하고 있는데
OS를 재기동하면 process-exporter에서 elasticsearch proces가 수집이 되지 않는다.
OS를 재기동하면 process-exporter와 elasticsearch 서비스가 동시에 시작되기 때문에
process-exporter에서 elasticsearch 서비스가 돌고 있음에도 불구하고 elasticsearch를 정상적으로 수집하지 못한다.
이런 경우 사용할 수 있는데 process-exporter option 중 recheck를 사용하면 OS가 재기동돼도
정상적으로 process 상태 수집이 가능하다.
process-exporter --help 명령어를 치면 아래 보이는 것처럼
여러 가지 옵션과 그에 대한 설명이 나온다.
kuber@node1:~$ process-exporter --help
Usage of process-exporter:
-children
if a proc is tracked, track with it any children that aren't part of their own group (default true)
-config.path string
path to YAML config file
-debug
log debugging information to stdout
-gather-smaps
gather metrics from smaps file, which contains proportional resident memory size (default true)
-man
print manual
-namemapping string
comma-separated list, alternating process name and capturing regex to apply to cmdline
-once-to-stdout-delay duration
Don't bind, just wait this much time, print the metrics once to stdout, and exit
-procfs string
path to read proc data from (default "/proc")
-procnames string
comma-separated list of process names to monitor
-recheck
recheck process names on each scrape
-threads
report on per-threadname metrics as well (default true)
-version
print version information and exit
-web.listen-address string
Address on which to expose metrics and web interface. (default ":9256")
-web.telemetry-path string
Path under which to expose metrics. (default "/metrics")
recheck option 사용
사용방법 : /usr/bin/process-exporter -config.path /etc/process-exporter.yml -recheck
recheck 옵션을 사용하면 스크랩할때마다 프로세스 이름이 재평가됨
recheck가 제공되지 않으면 프로세스 이름은 한 번만 적용
참고자료
https://github.com/ncabatoff/process-exporter/blob/master/README.md
반응형
'모니터링(Grafana, Prometheus)' 카테고리의 다른 글
| Grafana <-> Prometheus 구성도 (0) | 2023.04.23 |
|---|