uptime-kuma icon indicating copy to clipboard operation
uptime-kuma copied to clipboard

Automatically add `docker` containers to be tracked

Open Acyone opened this issue 3 years ago • 11 comments

⚠️ Please verify that this feature request has NOT been suggested before.

  • [X] I checked and didn't find similar feature request

🏷️ Feature Request Type

Other

🔖 Feature description

You should add a possibility for Kuma to check what docker containers are running, and start tracking them . This way it would not be needed to manually add them.

✔️ Solution

In my use case, I would want to see appear my running docker containers in the kuma webUI.

❓ Alternatives

I have considered having to add a special label to each container to be tracked (in the docker-compose file)

📝 Additional Context

Netdata has a similar feature : (source)

Netdata auto-detects running containers and auto-populates the right-hand menu with their IDs or container names, based on the configuration of your system.

Flame also has a similar functionnality using labels : (source)

In order to use the Docker integration, each container must have the following labels

Acyone avatar Nov 24 '21 13:11 Acyone

Just going to reference #882, as this is similar, but for local containers instead of k8s.

deefdragon avatar Nov 25 '21 09:11 deefdragon

This would be great, would add a lot more flexibility and less setup in the tool itself, but automatically monitoring when adding a new service via Docker-Compose. That would also add the ability to add the URL as well.

brhahlen avatar Nov 28 '22 11:11 brhahlen

Just to illustrate how this would help me: I'm currently in the process of updating all my monitors again, but it looks like I'm going to need(/want) 3 monitors per service:

  1. Docker
  2. HTTP Internal
  3. HTTP External

Image image

Right now, I need to add all these manually, which is a painful process. If I could add, for instance:

labels:
 - uptime.monitor.name=Adminer
 - uptime.monitor.Adminer.type=docker
 - uptime.monitor.Adminer.dockerhost=myhost
 - uptime.monitor.name=Adminer-Internal
 - uptime.monitor.Adminer-Internal.type=http
 - uptime.monitor.Adminer-Internal.url=http://adminer

A bit like how Traefik goes about with labels, if that makes sense?

brhahlen avatar Nov 28 '22 14:11 brhahlen

I'm doing the same thing and such a feature + this notation would be perfect. Utilizing labels would be a killer feature for extensive setups like mine.

I need 3 or even 4 monitors per container which becomes hard to manage very fast.

tenekev avatar May 18 '23 13:05 tenekev

This would be a great feature to implement.

raulvasquez avatar May 19 '23 17:05 raulvasquez

Would love to see that feature!

paulchartres avatar Jun 08 '23 20:06 paulchartres

@paulchartres @raulvasquez Please refrain from posting +1 / requests for updates things on issues, as this makes issue-management harder. Issues are for discussing what needs to be done how by whom. We use 👍🏻 on issues to prioritise work.

CommanderStorm avatar Jun 09 '23 15:06 CommanderStorm

I just wanted to follow up on this as its been a while, and it seems that it still may not be possible to have containers auto populate kuma. Is this on the roadmap for implementation at all?

Cheers

jbates58 avatar Aug 15 '23 23:08 jbates58

Is this on the roadmap for implementation at all?

Currently, this is not on the roadmap for the v2.0-release. You can check what is planned for the milestones here: https://github.com/louislam/uptime-kuma/milestones

v2.0 will include plenty of new features. Most notably the ability to scale past ~300-600 monitors, the ability to run with another database, subdirectory deployments and security enhancements like a rootless docker image.

If you/somebody else would like to implement this feature, here is our contribution guide: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md

CommanderStorm avatar Aug 16 '23 10:08 CommanderStorm

docker-compose based group creation will continue to be tracked in #4233 to make this more focused and hopefully more implementable

CommanderStorm avatar Dec 13 '23 13:12 CommanderStorm

If anyone is interested I've create a small service which creates Monitors based on docker labels: https://github.com/BigBoot/AutoKuma/tree/master

BigBoot avatar Jan 06 '24 17:01 BigBoot