0

I have a swarm with 2 nodes where I create two services. One on each node.

The service running on manager node is using the docker engine API to get some information.

My question is: Is it possible to obtain data from the container running on the other node? Like its stats? I know that the API has an endpoint which is containers/{containerID}/stats. But this only works for containers that are running on the same docker daemon right?

What's the best way to get info from containers that are remote? Is it only possible if the nodes where these containers are running expose their docker daemon API?

Thanks

MLGonc
  • 99
  • 2
  • 12

1 Answers1

0

The best way to do this is by writing a service that collects this information, and making this one 'global' so it runs on all nodes. Then, have the collected data pushed to a centralized database.