mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-26 11:27:00 +08:00
use days in certificate rules queries to improve notification values
This commit is contained in:
parent
b327fdfc23
commit
93542b8821
1 changed files with 3 additions and 3 deletions
|
|
@ -389,15 +389,15 @@ groups:
|
||||||
severity: critical
|
severity: critical
|
||||||
- name: Blackbox SSL certificate will expire soon
|
- name: Blackbox SSL certificate will expire soon
|
||||||
description: SSL certificate expires in less than 20 days
|
description: SSL certificate expires in less than 20 days
|
||||||
query: '86400 * 3 <= last_over_time(probe_ssl_earliest_cert_expiry[10m]) - time() < 86400 * 20'
|
query: '3 <= round((last_over_time(probe_ssl_earliest_cert_expiry[10m]) - time()) / 86400, 0.1) < 20'
|
||||||
severity: warning
|
severity: warning
|
||||||
- name: Blackbox SSL certificate will expire soon
|
- name: Blackbox SSL certificate will expire soon
|
||||||
description: SSL certificate expires in less than 3 days
|
description: SSL certificate expires in less than 3 days
|
||||||
query: '0 <= last_over_time(probe_ssl_earliest_cert_expiry[10m]) - time() < 86400 * 3'
|
query: '0 <= round((last_over_time(probe_ssl_earliest_cert_expiry[10m]) - time()) / 86400, 0.1) < 3'
|
||||||
severity: critical
|
severity: critical
|
||||||
- name: Blackbox SSL certificate expired
|
- name: Blackbox SSL certificate expired
|
||||||
description: SSL certificate has expired already
|
description: SSL certificate has expired already
|
||||||
query: 'last_over_time(probe_ssl_earliest_cert_expiry[10m]) - time() < 0'
|
query: 'round((last_over_time(probe_ssl_earliest_cert_expiry[10m]) - time()) / 86400, 0.1) < 0'
|
||||||
severity: critical
|
severity: critical
|
||||||
comments: |
|
comments: |
|
||||||
For probe_ssl_earliest_cert_expiry to be exposed after expiration, you
|
For probe_ssl_earliest_cert_expiry to be exposed after expiration, you
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue