InfoGrab Docs

GitLab Runner 사용량 모니터링

Prometheus 메트릭을 활용하여 GitLab Runner를 모니터링하는 방법과 Operator 관리 러너의 메트릭 설정을 안내합니다.

GitLab Runner는 Prometheus 를 사용하여 모니터링할 수 있습니다. 내장 Prometheus 메트릭 # GitLab Runner에는 네이티브 Prometheus 메트릭이 포함되어 있으며, /metrics 경로의 내장 HTTP 서버를 사용하여 노출할 수 있습니다. 서버가 활성화된 경우 Prometheus 모니터링 시스템에서 스크랩하거나 다른 HTTP 클라이언트로 액세스할 수 있습니다. 노출된 정보는 다음을 포함합니다: 러너 비즈니스 로직 메트릭(예: 현재 실행 중인 잡 수) Go 특정 프로세스 메트릭(예: 가비지 컬렉션 통계, goroutine, memstats) 일반 프로세스 메트릭(메모리 사용량, CPU 사용량, 파일 디스크립터 사용량 등) 빌드 버전 정보 메트릭 형식은 Prometheus의 Exposition formats 사양에 문서화되어 있습니다. 이 메트릭은 운영자가 러너를 모니터링하고 통찰력을 얻는 방법으로 사용됩니다. 예를 들어 러너 호스트의 평균 부하 증가가 처리된 잡 증가와 관련이 있는지 알고 싶을 수 있습니다. 또는 머신 클러스터를 실행 중이고 인프라에 변경 사항을 적용할 수 있도록 빌드 트렌드를 추적하고 싶을 수 있습니다. Prometheus에 대해 더 알아보기 # 이 HTTP 엔드포인트를 스크랩하도록 Prometheus 서버를 설정하고 수집된 메트릭을 사용하려면 Prometheus의 시작하기 가이드를 참조하세요. Prometheus를 구성하는 방법에 대한 자세한 내용은 구성 섹션을 참조하세요. 알림 구성에 대한 자세한 내용은 알림 규칙 과 Alertmanager 를 참조하세요. 사용 가능한 메트릭 # 사용 가능한 모든 메트릭의 전체 목록을 찾으려면 메트릭 엔드포인트를 구성하고 활성화한 후 curl 로 확인하세요. 예를 들어 수신 포트 9252 로 구성된 로컬 러너의 경우: $ curl -s "http://localhost:9252/metrics" | grep -E "# HELP" # HELP gitlab_runner_api_request_statuses_total The total number of api requests, partitioned by runner, endpoint and status. # HELP gitlab_runner_autoscaling_machine_creation_duration_seconds Histogram of machine creation time . # HELP gitlab_runner_autoscaling_machine_states The current number of machines per state in this provider. # HELP gitlab_runner_concurrent The current value of concurrent setting # HELP gitlab_runner_errors_total The number of caught errors. # HELP gitlab_runner_limit The current value of limi