기타
프로메테우스&그라파나로 인증서 체크
앗사비
2024. 10. 30. 12:22
728x90
배경 지식
https://myinbox.tistory.com/261
1. 새로운 룰 추가
2. 2번 Define query and alert condition A항목 > code 모드로 전환 > 아래 예시처럼 변경
만료시각에서 현재시각 뺀 초 단위를 시간으로 바꾸고 (3600) 일로 바꾸기 (24)
(probe_ssl_earliest_cert_expiry{instance="https://www.test.com/"} - time()) / 3600 / 24
3. B항목은 Math 로 변경 > Set as alert condition 클릭 > 아래 처럼 입력 (30일 미만시 알림)
$A < 30
---
https://promlabs.com/blog/2024/02/06/monitoring-tls-endpoint-certificate-expiration-with-prometheus/
728x90