Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCSP status #143

Open
atroubat opened this issue Jul 28, 2023 · 2 comments
Open

OCSP status #143

atroubat opened this issue Jul 28, 2023 · 2 comments

Comments

@atroubat
Copy link

Hello @ribbybibby
Do you still work on this exporter ?

I have an issue with OCSP status. When I am using openssl command I have this return for OCSP:
OCSP response: no response sent
But the exporter return for the same domain:
ssl_ocsp_response_status 0

Is it possible to fix this please ?
Thanks

@ribbybibby
Copy link
Owner

Thanks for reporting this issue.

Looks like this happens because:

  1. We register the metrics, even when there is no ocsp response.
  2. The default value for the status metric is 0, which is also the 'Good' response

See: https://github.com/ribbybibby/ssl_exporter/blob/master/prober/metrics.go#L206-L217.

Perhaps we shouldn't register the metrics if we don't have an OCSP response.

On reflection, I wonder whether I should have made the OCSP functionality a module option and then we could fail if there is no ocsp response.

@ribbybibby
Copy link
Owner

The ssl_ocsp_response_stapled metric can be used to check whether there was a response at all.

For instance, you could check for a non-good status, but only where there is a stapled response with something like:

ssl_ocsp_response_stapled == 1 and ssl_ocsp_response_status != 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants