Docker API labels Swarm context and regular for service discovery. #3267

Closed
opened 2026-02-28 03:23:46 -05:00 by deekerman · 3 comments
Owner

Originally created by @Leopere on GitHub (Apr 14, 2024).

n/a

🏷️ Feature Request Type

API / automation options

🔖 Feature description

When it comes to deploying stuff into docker and docker swarm it helps to be able to have apps that hook into the docker socket to look for labels that might say please pay attention to me for X reason... For example you can set Traefik settings on a per microservice basis using docker labels.

For example this set of labels has declarations for gethomepage/homepage and traefik 2.x

      labels:
        homepage.group: Uptime Kuma
        homepage.name: Uptime
        homepage.href: https://uptime.example.com/status/internal-services
        homepage.description:
        us.nixc.autodeploy: "true"
        traefik.enable: "true"
        traefik.http.routers.production_uptime-kuma_uptime.tls: "true"
        traefik.http.services.production_uptime-kuma_uptime.loadbalancer.server.port: 3001
        traefik.http.routers.production_uptime-kuma_uptime.rule: Host(`uptime.example.com`)
        traefik.http.routers.production_uptime-kuma_uptime.entrypoints: websecure
        traefik.http.routers.production_uptime-kuma_uptime.tls.certresolver: letsencryptresolver
        traefik.http.routers.production_uptime-kuma_uptime.service: production_uptime-kuma_uptime
        traefik.docker.network: traefik

✔️ Solution

Write one or two standard labels to tell uptime kuma to monitor a service within swarm or via a specified path such as perhaps the following.

      labels:
        uptimekuma.monitor: "true"
        uptimekuma.monitor.url: https://uptime.example.com
        uptimekuma.monitor.retry: 60
the options could be endless but keep it simple at first.

Alternatives

No response

📝 Additional Context

Currently the docker stuff is baked in a way that you have to rely on static container names for UptimeKuma to look for and that's fine and all but its usefulness is limited whereas offering deeper docker API integration would be supremely helpful there is also a way to define the docker API endpoint through http/s and the socket so you're not stuck putting the monitor on a swarm manager node for example.

Originally created by @Leopere on GitHub (Apr 14, 2024). ### 📑 I have found these related issues/pull requests n/a ### 🏷️ Feature Request Type API / automation options ### 🔖 Feature description When it comes to deploying stuff into docker and docker swarm it helps to be able to have apps that hook into the docker socket to look for labels that might say please pay attention to me for X reason... For example you can set Traefik settings on a per microservice basis using docker labels. For example this set of labels has declarations for gethomepage/homepage and traefik 2.x ```yaml labels: homepage.group: Uptime Kuma homepage.name: Uptime homepage.href: https://uptime.example.com/status/internal-services homepage.description: us.nixc.autodeploy: "true" traefik.enable: "true" traefik.http.routers.production_uptime-kuma_uptime.tls: "true" traefik.http.services.production_uptime-kuma_uptime.loadbalancer.server.port: 3001 traefik.http.routers.production_uptime-kuma_uptime.rule: Host(`uptime.example.com`) traefik.http.routers.production_uptime-kuma_uptime.entrypoints: websecure traefik.http.routers.production_uptime-kuma_uptime.tls.certresolver: letsencryptresolver traefik.http.routers.production_uptime-kuma_uptime.service: production_uptime-kuma_uptime traefik.docker.network: traefik ``` ### ✔️ Solution Write one or two standard labels to tell uptime kuma to monitor a service within swarm or via a specified path such as perhaps the following. ```yaml labels: uptimekuma.monitor: "true" uptimekuma.monitor.url: https://uptime.example.com uptimekuma.monitor.retry: 60 the options could be endless but keep it simple at first. ``` ### ❓ Alternatives _No response_ ### 📝 Additional Context Currently the docker stuff is baked in a way that you have to rely on static container names for UptimeKuma to look for and that's fine and all but its usefulness is limited whereas offering deeper docker API integration would be supremely helpful there is also a way to define the docker API endpoint through http/s and the socket so you're not stuck putting the monitor on a swarm manager node for example.
deekerman 2026-02-28 03:23:46 -05:00
Author
Owner

@CommanderStorm commented on GitHub (Apr 14, 2024):

I think this is better tracked in https://github.com/louislam/uptime-kuma/issues/4233, as docker-compose and docker swarm are likely not as different.
=> merging these issuses via closing this one as a duplicate.

Tip

If you have a look at the dependency linked in https://github.com/louislam/uptime-kuma/issues/957, @BigBoot has shared https://github.com/BigBoot/AutoKuma, which claims to solve this usecase.
We have not tested if it works as advertised, nor audited said software.

@CommanderStorm commented on GitHub (Apr 14, 2024): I think this is better tracked in https://github.com/louislam/uptime-kuma/issues/4233, as docker-compose and docker swarm are likely not as different. => merging these issuses via closing this one as a duplicate. > [!TIP] > If you have a look at the dependency linked in https://github.com/louislam/uptime-kuma/issues/957, `@BigBoot` has shared https://github.com/BigBoot/AutoKuma, which claims to solve this usecase. **We have not tested if it works as advertised, nor audited said software.**
Author
Owner

@Leopere commented on GitHub (Apr 15, 2024):

So basically it has to be a sidecar process to get API supported a bit better :/ thanks.

Also super happy with Uptime Kuma I just wish I could export things to it from other services like Uptime Robot.

@Leopere commented on GitHub (Apr 15, 2024): So basically it has to be a sidecar process to get API supported a bit better :/ thanks. Also super happy with Uptime Kuma I just wish I could export things to it from other services like Uptime Robot.
Author
Owner

@CommanderStorm commented on GitHub (Apr 15, 2024):

just wish I could export things to it from other services like Uptime Robot

This is tracked in #1190
Currently, nobody has found the time to look at their shema and integrate it.

@CommanderStorm commented on GitHub (Apr 15, 2024): > just wish I could export things to it from other services like Uptime Robot This is tracked in #1190 Currently, nobody has found the time to look at their shema and integrate it.
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/uptime-kuma#3267
No description provided.