[GH-ISSUE #580] Can't use just host name when defining webhooks #425

Closed
opened 2026-02-25 23:42:24 +03:00 by kerem · 2 comments
Owner

Originally created by @mountaindude on GitHub (Oct 25, 2021).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/580

Using at the time latest version, 1.23.1.
Running as Docker container on Ubuntu.

Trying to create a webhook that should be called when a check goes up/down.
Works as expected when I use a full URL with host consisting of at least two parts (for example host.localdomain).
When using just single part, host, there's a message "Enter a valid URL." shown and the entered info isn't saved.

The thing is, when running Healthchecks on the same server as other Docker containers, it's easiest to refer to those containers just by their container name. In my case I have another container (on same Docker host) called node-red-prod to which I'd like to send the alert (using a Healthchecks webhook).
Less modifying Docker's name resolution (which I don't want to do), the only option is to refer to that Node-RED container as just node-red-prod. Which cannot be done in Healthcheck, it seems.

Suggestion: Should be ok to use just a hostname when defining webhooks.

image

Originally created by @mountaindude on GitHub (Oct 25, 2021). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/580 Using at the time latest version, 1.23.1. Running as Docker container on Ubuntu. Trying to create a webhook that should be called when a check goes up/down. Works as expected when I use a full URL with host consisting of at least two parts (for example `host.localdomain`). When using just single part, `host`, there's a message "Enter a valid URL." shown and the entered info isn't saved. The thing is, when running Healthchecks on the same server as other Docker containers, it's easiest to refer to those containers just by their container name. In my case I have another container (on same Docker host) called `node-red-prod` to which I'd like to send the alert (using a Healthchecks webhook). Less modifying Docker's name resolution (which I don't want to do), the only option is to refer to that Node-RED container as just `node-red-prod`. Which cannot be done in Healthcheck, it seems. Suggestion: Should be ok to use just a hostname when defining webhooks. ![image](https://user-images.githubusercontent.com/1029262/138635669-7428e69a-9357-4a56-bb3e-570c91ad7a75.png)
kerem closed this issue 2026-02-25 23:42:25 +03:00
Author
Owner

@cuu508 commented on GitHub (Oct 28, 2021):

Looks like the URL validation rules would need to be stricter for the hosted service (no localhost, no 127.0.0.1, etc.) and less strict for self-hosted instances. I'll think about how to handle this.

In the meantime, a dirty workaround would be to first save the webhook integration using node-red.mydomain.com, and then fix the URL in Django admin.

<!-- gh-comment-id:953751227 --> @cuu508 commented on GitHub (Oct 28, 2021): Looks like the URL validation rules would need to be stricter for the hosted service (no localhost, no 127.0.0.1, etc.) and less strict for self-hosted instances. I'll think about how to handle this. In the meantime, a dirty workaround would be to first save the webhook integration using node-red.mydomain.com, and then fix the URL in Django admin.
Author
Owner

@mountaindude commented on GitHub (Oct 28, 2021):

Yeah there are various ways of working around it, I ended up locking the internal IPs of the Docker containers, then using those directly. Ugly - but works in this particular scenario.

<!-- gh-comment-id:953913611 --> @mountaindude commented on GitHub (Oct 28, 2021): Yeah there are various ways of working around it, I ended up locking the internal IPs of the Docker containers, then using those directly. Ugly - but works in this particular scenario.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#425
No description provided.