this post was submitted on 12 Jul 2023
10 points (85.7% liked)

Selfhosted

60911 readers
954 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

Hello.

Pretty sure I'm doing something stupid, but I can't find it.

I have Caddy and Uptime-kuma installed as Docker containers. They are on the same Docker bridge network. Both work fine (with the below exception).

I'm trying to monitor Caddy virtual hosts from Uptime-kuma and getting a timeout.

If I exec into the Uptime-kuma container, I can ping the host name I want to monitor (and the DNS is resolving correctly to the Docker hosts external IP).

But I can't reach port 80/443 using telnet or openssl.

Any suggestions for what I might be doing wrong?

Thanks!

you are viewing a single comment's thread
view the rest of the comments
[–] sneakyninjapants@sh.itjust.works 2 points 3 years ago* (last edited 3 years ago) (1 children)

The way I have my monitoring set up is to poll the containers from behind the proxy layer. Ex. if I'm trying to poll Portainer for example:

***
services:
    portainer:
    ...

with the service name portainer

from uptime-kuma within the same docker network it would look like this:

Can confirm this is working correctly to monitor that the service is reachable. This doesn't however ensure that you can reach it from your computer, because that depends on if your reverse proxy is configured correctly and isn't down, but that's what I wanted in my case.

Edit: If you're wanting to poll the http endpoint you would add it before like http://whatever_service:whatever_port

[–] outcide@lemmy.world 2 points 3 years ago (1 children)

Thanks. In this case I'm trying to monitor Caddy itself (sites that are just html files that it hosts rather than redirect to other containers). I could point the monitor at caddy:443 but then I'd need to find someway to specify the HOST: for the virtualhosting to work?

[–] sneakyninjapants@sh.itjust.works 2 points 3 years ago (1 children)

Oh I see, I definitely misunderstood what you were asking. How is your caddy server set up? Is it serving one site per subdomain (site.your.domain) or is it one site per path (your.domain/site/)? I am running traefik so I probably won't be able to help with specifics, but it's worth a shot.

[–] outcide@lemmy.world 2 points 3 years ago

Caddy is server subdomains and standalone domains, doesn't seem to make a difference which is which .. neither work. For the moment I'm monitoring them from another server but that's annoying ... which I could figure out what I'm doing wrong!