ribbybibby / ssl_exporter

Exports Prometheus metrics for TLS certificates
Apache License 2.0
525 stars 99 forks source link

Feat/remote file #144

Closed jaroug closed 5 months ago

jaroug commented 1 year ago

Add support for probing a remote PEM file over http/https

This is a corner case to be able to monitor BIMI related certificates

dragoangel commented 9 months ago

Looks nice

jaroug commented 8 months ago

Hi :) no worries I'm glad the project is still alive.

I made the changes requested, at least I hope it matches your expectations. I honestly can't remember why I thought it was a good idea to download the file :sweat_smile:

dragoangel commented 8 months ago

LGTM

dragoangel commented 7 months ago

@ribbybibby can you please review if this PR now is okay?

ribbybibby commented 5 months ago

Thank you for the contribution @jaroug. I've made some of my suggested changes and fixed some other things up and now I think this is good to merge.

dragoangel commented 5 months ago

@ribbybibby can we get 2.5.0 released with this feature please? 🙏

dragoangel commented 3 months ago

@ribbybibby kind reminder - this feature not get into 2.4.3 release, as it was been released before merging this branch.

dragoangel commented 1 month ago

@jaroug btw, I found out that ssl_verified_cert_not_after not available as metrics for http_file, is this desired behavior?

I get managed to create alert for ssl_cert_not_after only if ssl_verified_cert_not_after not exist for instance, but it was a bit challenging:

    (
      (
        ssl_cert_not_after{namespace="external-ssl-monitor"}
        - time()
      ) < 86400 * 14
    )
    unless
    sum without (chain_no) (
      ssl_verified_cert_not_after{chain_no="0",namespace="external-ssl-monitor"}
    )