crazy-max / diun

Receive notifications when an image is updated on a Docker registry
https://crazymax.dev/diun/
MIT License
3.13k stars 116 forks source link

Connect to many than one remote docker host #263

Open SAOPP opened 3 years ago

SAOPP commented 3 years ago

Hi! It's a question!

Thanks for Diun! Amazing!

It's possible to implemented remote monitoring for a few remote docker instances from one Diun? For example listing them and giving a name with ip via a config file or still use variables for this type REMOTE_HOST1_HOST and REMOTE_HOST1_NAME something like this... Any comments 'bout this? Or is the implementation of such functionality will require a lot of effort and is impossible now?

Thanks in advance!

crazy-max commented 3 years ago

@SAOPP #257

crazy-max commented 3 years ago

After thinking about it I think it would be more reliable and judicious to create an "agent" to implement this. For example, we could have an agent-type provider that would be another instance of Diun that we could exploit. I will create a draft about it and come back to you later.

SAOPP commented 3 years ago

Awesome! :)

gabriel-vanca commented 3 years ago

Hi. Any update on this?

mediacowboy commented 2 years ago

Any news on this? I just started using this and would love this feature as I have 4 host all running docker.

SAOPP commented 2 years ago

Run another docker-instance of diun.

gabriel-vanca commented 2 years ago

Run another docker-instance of diun.

That's rather inconvenient if you use half a dozen hosts.

mediacowboy commented 2 years ago

Run another docker-instance of diun.

That's rather inconvenient if you use half a dozen hosts.

Agreed, I would perfer a solution similar to portainer where I can install an endpoint agent.

I am running 5 host all with different services. What I did for now was set up each container with a different api key for pushover and modified the host name to show me which host the container is on when it sends a notification.

SAOPP commented 2 years ago

Run another docker-instance of diun.

That's rather inconvenient if you use half a dozen hosts.

Agree, but I have half a dozen hosts and 1 docker stack for diun, I don't see a problem bro.

instantdreams commented 2 years ago

I have four separate servers running docker containers via docker-compose:

  1. Edge Server 1 : NPM, PiHole, Wireguard, DuckDNS, Netdata
  2. Edge Server 2 : NPM, PiHole, Wireguard, DuckDNS, Netdata
  3. Main Server : 22 images including Prometheus, Grafana, and of course Netdata
  4. Security Server : Frigate, four instances of Kerberos Agent, Netdata

I am running Diun on my main server and it is working very well so far - thank you! - but I would also like to explore the possibility of installing an agent on other local servers to expose their docker manifest rather than installing three additional instances.

We could equate the main instance of Diun as Prometheus and the agents of Diun as Netdata, collecting information from any enabled and accessible hosts and pushing data according to their local cron jobs or - by my preference - responding to the central Diun instance cron job call. (Also next TTRPG session I have is going to include a shadowy group called the Agents of Diun, heh)

This would still be relatively simple, but the idea would be:

This could easily be managed by using docker-compose files with host and agent services, and host and agent binaries.

Just some ideas.

mabed-fr commented 2 years ago

I have one diun per instance

→ docker stats diun --no-stream CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS f7eb3d4f5ad4 diun 0.02% 15.35MiB / 473.1MiB 3.24% 819kB / 259kB 18.3GB / 23.9MB 7

Is not à problem

Londoneye02 commented 2 years ago

Sorry for the newbie question. @mabed-fr , @SAOPP, where can I find an example of how to do configure a diun instance to watch containers on a different server (on the same network)??

how do I configure diun.yml? docker: endpoint: 192.168.1.117 and docker-compose.yml??

SAOPP commented 2 years ago

Here is on: https://crazymax.dev/diun/providers/docker/#endpoint

gabriel-vanca commented 3 months ago

Hi. Any update on this?