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

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

Closed
Leopere opened this issue Apr 15, 2024 · 3 comments
Closed

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

Leopere opened this issue Apr 15, 2024 · 3 comments
Labels
area:monitor Everything related to monitors feature-request Request for new features to be added

Comments

@Leopere
Copy link

Leopere commented Apr 15, 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

      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.

@Leopere Leopere added the feature-request Request for new features to be added label Apr 15, 2024
@CommanderStorm
Copy link
Collaborator

I think this is better tracked in #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 #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 CommanderStorm closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
@CommanderStorm CommanderStorm added the area:monitor Everything related to monitors label Apr 15, 2024
@Leopere
Copy link
Author

Leopere commented 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.

@CommanderStorm
Copy link
Collaborator

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:monitor Everything related to monitors feature-request Request for new features to be added
Projects
None yet
Development

No branches or pull requests

2 participants