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

Introduce new check method ("SSL") #257

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JFronny
Copy link

@JFronny JFronny commented Jan 5, 2025

I use Upptime to check on a variety of services I run on my home server.
One of the services I use it for is a mail server.
Unfortunately, the simple "tcp-ping" check does not work in this use case since the port forwarding configured in our network causes the check to assume the port is accessible (and thus that the service is working) even if it is down.
Opening an SSL connection and checking whether the returned certificate is correct avoids this issue.
Additionally, this check is undoubtedly useful for any other services that support SSL but don't use HTTPS, allowing Upptime instances to verify a bit more of their configuration than "tcp-ping" would.

This code is largely based on the existing "tcp-ping"-check but altered to use a TLS socket.

@btlogy
Copy link

btlogy commented Feb 5, 2025

I would dare to give an opinion about the implementation (not my area of expertise), but it seems to be a nice feature @JFronny: 👍

Now LetsEncrypt is ending their expiration notification, I was looking if Upptime had some advanced TLS capabilities...

And by looking at you PR, I am under the impression that this check-tls method could also provide a better way to the check if the certificate is about to expire via getPeerCertificate(), instead of parsing curl verbose output in the check-http method).

Am I right to think this way?

Also, I suppose you should create an issue to document this check-tls use case and get this PR picked up for review? And I'll likely create one there for the certificate validity...

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

Successfully merging this pull request may close these issues.

2 participants