qdm12 / ddns-updater

Container to update DNS records periodically with WebUI for many DNS providers
https://hub.docker.com/r/qmcgaw/ddns-updater/
MIT License
1.66k stars 157 forks source link

Does the healthchecks.io feature recently introduced support self-hosted healthcheck services? #701

Closed kelvtech-co-uk closed 5 months ago

kelvtech-co-uk commented 5 months ago

Hi, thanks for the great app and sorry to bother you with this but I'm confused as to what functionality is already in place. If this capability isn't built yet I'll happily raise a feature request following this but thought it worthwhile to check first.

I added "the below" healthcheck directives to my ddns-updater containers compose file and it didn't work where others did. I then revisited this github repo and used google and found a recent feature request for this functionality. However reading the description of the environment variables I'm confused as it suggests ddns-updater is waiting for healthchecks.io to reach out to it for checks whereas my expectation is the other way around? Additionally given there is no way to add in a custom URL for my self-hosted container I don't believe ddns-updater supports this option?

The Below Healthchecks.io provide guides as well as pre-built containers so their application can be self-hosted rather than run on their cloud. I've recently deployed this container in my home network and now have a number of containers checking into my local healthcheck container. I've done this via updating my docker-compose.yml and including a custom healthcheck directive as below...

some_container:
  container_name: some_container
  restart: unless-stopped
  network_mode: bridge
  ports:
    - 8001:8000/tcp
  volumes:
    - /some_volume:/stuff
  healthcheck:
    test: ["CMD", "curl", "-f", "http://mydomain.local:8015/ping/some_uuid"]
    interval: 1m
    timeout: 5s
    retries: 3
    start_period: 30s
  image: some_image
qdm12 commented 5 months ago

However reading the description of the environment variables I'm confused as it suggests ddns-updater is waiting for healthchecks.io to reach out to it for checks whereas my expectation is the other way around?

UUID for healthchecks.io to send a heartbeat on every update check

Definitely the other way around, ddns-updater sends heatbeats to healthchecks.io. I changed the wording in 11575ee82ae86aad57f7381b03fe5ce8edd7105d to:

UUID to idenfity with the healthchecks.io server

Additionally given there is no way to add in a custom URL for my self-hosted container I don't believe ddns-updater supports this option?

Done in 8473b3e1cdba693cb68909fe03302bd6ffab006f with HEALTH_HEALTHCHECKSIO_BASE_URL 😉

kelvtech-co-uk commented 5 months ago

Hey this is super cool thank you!

Sorry to say I'm still having an issue unfortunately. After updating the Docker image and compose yml my log now contains...

ddns  | ├── Health
ddns  | |   ├── Server listening address: 127.0.0.1:9999
ddns  | |   ├── Healthchecks.io base URL: http://192.168.1.5:8015/ping
ddns  | |   └── Healthchecks.io UUID:  1f6d5a41-cf78-4080-b18d-45b146cfd8f4

But then errors with...

2024-04-30T14:46:03+01:00 ERROR pinging healthchecks.io failed: doing http request: Get "http:/192.168.1.5:8015/ping/1f6d5a41-cf78-4080-b18d-45b146cfd8f4": http: no Host in request URL

I'm no dev but looks to me like its the parsing of the // characters at the start of the URL?

qdm12 commented 5 months ago

My bad, fixed in 937a249ffac9c7b498bcf7b90936f1228a049771 !

kelvtech-co-uk commented 5 months ago

Boom, awesome. Great app and great support thank you for giving up your time for this!