diun icon indicating copy to clipboard operation
diun copied to clipboard

Connect to many than one remote docker host

Open SAOPP opened this issue 4 years ago • 14 comments

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!

SAOPP avatar Jan 26 '21 11:01 SAOPP

@SAOPP #257

crazy-max avatar Feb 28 '21 23:02 crazy-max

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.

crazy-max avatar Feb 28 '21 23:02 crazy-max

Awesome! :)

SAOPP avatar Mar 01 '21 07:03 SAOPP

Hi. Any update on this?

gabriel-vanca avatar Oct 25 '21 12:10 gabriel-vanca

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

mediacowboy avatar Jan 03 '22 04:01 mediacowboy

Run another docker-instance of diun.

SAOPP avatar Jan 03 '22 10:01 SAOPP

Run another docker-instance of diun.

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

gabriel-vanca avatar Jan 04 '22 16:01 gabriel-vanca

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.

mediacowboy avatar Jan 04 '22 17:01 mediacowboy

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.

SAOPP avatar Jan 04 '22 18:01 SAOPP

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:

  • One Server
    • Host + Agent
  • Multiple Servers
    • Server 1 Host
    • Server 1 Agent
    • Server 2 Agent
    • Server x Agent

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

Just some ideas.

instantdreams avatar Feb 20 '22 23:02 instantdreams

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

mabed-fr avatar Oct 20 '22 07:10 mabed-fr

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??

Londoneye02 avatar Nov 18 '22 16:11 Londoneye02

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

SAOPP avatar Nov 21 '22 09:11 SAOPP