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

Allow custom healthcheck URL #29

Closed
karan opened this issue Jun 20, 2020 · 6 comments · Fixed by #34
Closed

Allow custom healthcheck URL #29

karan opened this issue Jun 20, 2020 · 6 comments · Fixed by #34
Labels
enhancement New feature or request

Comments

@karan
Copy link

karan commented Jun 20, 2020

I use a self-hosted HC instance and would like to use that for monitoring gphotos-sync.

It'll be more flexible if HEALTHCHECK_ID was instead HEALTHCHECK_URL.

@JakeWharton
Copy link
Owner

It used to be URL but then it felt weird to just append /start and hope it would work. Since this isn't common, I would prefer to add HEALTHCHECK_HOST where you can specify a host and port. Is that enough for you?

I was actually talking to someone else about this last week...

@JakeWharton JakeWharton added the enhancement New feature or request label Jun 20, 2020
@karan
Copy link
Author

karan commented Jun 21, 2020

Yeah that would work as an override (though I personally find the whole URL as more flexible).

@JakeWharton
Copy link
Owner

We could allow specifying two full URLs then, at the expense of you having to specify the full /start URL and the regular one. This would also make it agnostic to the provider of the health check since presumably there are other services which do similar things, although you have no way of controlling the body or headers of the requests.

@karan
Copy link
Author

karan commented Jun 24, 2020

That'd be fine although a bit too verbose. A couple of other options:

  • Keep 1 URL, assume that URL the URL is a HC URL and follows their spec. /start and all.
  • Keep 1 URL, and a IS_HEALTHCHECK_API bool. That being true would make it so we can use the /start API.

@issmirnov
Copy link

+1 to HEALTHCHECK_HOST. I was about to open a PR when I saw this issue.

@issmirnov
Copy link

Thank you! Confirmed working.

Note to other passing users: reminder that unless you have a redirect setup on a root domain, you probably want to set https://your.domain.com/ping as the healthcheck host, not just https://your.domain.com

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

Successfully merging a pull request may close this issue.

3 participants