Closed petersg closed 1 year ago
The timestamp is the value of the metric - it's not one of the labels. It's a Unix timestamp (seconds since midnight Jan 1, 1970).
ssl_cert_not_after - time()
will give you seconds until expiration
(ssl_cert_not_after - time()) / 86400
will give you days until expiration, etc.
You can use 'humanizeTimestamp' in your alerts to show the actual date of expiration. I include an annotation like:
expiration_time: |
{{ with printf "ssl_cert_not_after{serial_no='%s'}" .Labels.serial_no |query }}{{ . | first | value | humanizeTimestamp }}{{ end }}
Ok solved, it seems that grafana cant read correctly the $instance and $job but removing this or hardcoded it fix the issue.
Hello all,
I have configured ssl_exporter to check some certs and display it into prometheus -> grafana.
My job config: `- job_name: "ssl" metrics_path: /probe params: module: ["https"] static_configs:
Kind Regards, Petar