use local_x509
This commit is contained in:
parent
dc8bd8cae5
commit
6778edbe52
4 changed files with 27 additions and 5 deletions
|
@ -23,7 +23,7 @@ groups:
|
||||||
value: "{{ $value }}"
|
value: "{{ $value }}"
|
||||||
severity: 'warning'
|
severity: 'warning'
|
||||||
|
|
||||||
- alert: CertExpLess30days
|
- alert: CertExpLess30daysProb
|
||||||
expr: (probe_ssl_earliest_cert_expiry{job="blackbox internal tls"}-time()) < 2592000
|
expr: (probe_ssl_earliest_cert_expiry{job="blackbox internal tls"}-time()) < 2592000
|
||||||
annotations:
|
annotations:
|
||||||
title: '{{ $labels.cname }} will expire soon'
|
title: '{{ $labels.cname }} will expire soon'
|
||||||
|
@ -34,7 +34,7 @@ groups:
|
||||||
value: "{{ $value }}"
|
value: "{{ $value }}"
|
||||||
severity: 'warning'
|
severity: 'warning'
|
||||||
|
|
||||||
- alert: CertExpLess10days
|
- alert: CertExpLess10daysProb
|
||||||
expr: (probe_ssl_earliest_cert_expiry{job="blackbox internal tls"}-time()) < 864000
|
expr: (probe_ssl_earliest_cert_expiry{job="blackbox internal tls"}-time()) < 864000
|
||||||
annotations:
|
annotations:
|
||||||
title: '{{ $labels.cname }} expiracy is imminent!'
|
title: '{{ $labels.cname }} expiracy is imminent!'
|
||||||
|
|
|
@ -156,4 +156,26 @@ groups:
|
||||||
labels:
|
labels:
|
||||||
value: "{{ $value }}"
|
value: "{{ $value }}"
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|
||||||
|
- alert: CertExpLess30days
|
||||||
|
expr: (local_x509_expiry_date{job="blackbox internal tls"}-time()) < 2592000
|
||||||
|
annotations:
|
||||||
|
title: '{{ $labels.cname }} will expire soon'
|
||||||
|
description: >-
|
||||||
|
The certificate {{ $labels.cname }} on {{ $labels.instance }} at {{ $labels.file }}
|
||||||
|
will expire in {{ $value | humanizeDuration }}, it's time to renew it.
|
||||||
|
labels:
|
||||||
|
value: "{{ $value }}"
|
||||||
|
severity: 'warning'
|
||||||
|
|
||||||
|
- alert: CertExpLess10days
|
||||||
|
expr: (local_x509_expiry_date{job="blackbox internal tls"}-time()) < 864000
|
||||||
|
annotations:
|
||||||
|
title: '{{ $labels.cname }} expiracy is imminent!'
|
||||||
|
description: >-
|
||||||
|
The certificate {{ $labels.cname }} on {{ $labels.instance }} at {{ $labels.file }}
|
||||||
|
will expire in {{ $value | humanizeDuration }}, RENEW IT!!!
|
||||||
|
labels:
|
||||||
|
value: "{{ $value }}"
|
||||||
|
severity: 'critical'
|
||||||
...
|
...
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# The list of certs to monitor
|
# The list of certs to monitor
|
||||||
ARGS="
|
ARGS="
|
||||||
/etc/letsencrypt/live/**/cert.pem
|
/etc/letsencrypt/live/**/cert.pem
|
||||||
/etc/hackypky/crts/*.pem
|
/etc/hackypky/crts/*.crt
|
||||||
"
|
"
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
- name: Add the script
|
- name: Add the script
|
||||||
copy:
|
copy:
|
||||||
src: local_x509.sh
|
src: local_x509.sh
|
||||||
dest: /usr/share/prometheus-node-exporter/local_x509.sh
|
dest: /usr/share/prometheus-node-exporter-collectors/local_x509.sh
|
||||||
group: root
|
group: root
|
||||||
owner: root
|
owner: root
|
||||||
mode: u=rwx,g=,o=
|
mode: u=rwx,g=,o=
|
||||||
|
@ -66,4 +66,4 @@
|
||||||
systemd:
|
systemd:
|
||||||
name: prometheus-node-exporter-local_x509.timer
|
name: prometheus-node-exporter-local_x509.timer
|
||||||
enabled: true
|
enabled: true
|
||||||
|
state: started
|
||||||
|
|
Loading…
Reference in a new issue