scope icon indicating copy to clipboard operation
scope copied to clipboard

Containers on the same overlay network are not shown as connected

Open pgeorgiev333 opened this issue 10 years ago • 7 comments

Environment:

  • 3 hosts (1 swarm manager, 2 swarm nodes using pre-1.12 swarm mode)
  • docker engine 1.11.2
  • docker-compose 1.7.1
  • scope 0.17.1

Description;

  • I started the scope service on all 3 hosts (the swarm nodes used this command: "scope launch master:4040")
  • Then i started 4 containers using docker-compose that are on the same overlay network
  • Note that i do not use weave networks - just the default docker overlay driver

Result:

When i open scope i see the containers but they are not visually connected. I can select the network as a filter and this will highlight only the 4 containers but they are never linked.

report.zip docker-compose.zip

Expected:

Even though i do not use "links" in the docker-compose file (as this will put all linked containers on the same host) all 4 containers are part of the same network so they are linked and i would expect that i should be able to see this visually.

pgeorgiev333 avatar Oct 18 '16 04:10 pgeorgiev333

@pgeorgiev333 Are those containers talking to each other? (i.e. is there a TCP connection between them?)

Note that edges in the graph view don't represent a same-network belonging relationship, they mean "there's a TCP connection between them"

2opremio avatar Oct 18 '16 08:10 2opremio

Hm. Yes, they talk (not all the time though). After some time i saw a link between two of the containers but not all of them. The case i have is that the product i'm testing is deployed on edge, mut and mut2 containers and the automated tests are executed from the executor against the edge, and then the edge talks to mut or mut 2.

Just a question - if i use "links" in the docker-compose file will i see any links without any traffic? Or vice-versa (i'll see the links even if there is no traffic).

Is there any other rule that will create the links apart from network traffic?

Another question - i do not see the Application tab in the my UI (i saw it in some of the docs pages). How can i see it? How can i say "hey, these 4 containers represent one application and they are connected to each other using the overlay network and i want to see them connected all the time even if there is no traffic between them?"

Thanks

pgeorgiev333 avatar Oct 18 '16 09:10 pgeorgiev333

I just tried the docker compose with links and there are no link unless i ssh connect from one container to another.

So it looks like "not a defect" but i would still like to know if this is possible:

i do not see the Application tab in the my UI (i saw it in some of the docs pages). How can i see it? How can i say "hey, these 4 containers represent one application and they are connected to each other using the overlay network and i want to see them connected all the time even if there is no traffic between them?"

pgeorgiev333 avatar Oct 18 '16 09:10 pgeorgiev333

Is there any other rule that will create the links apart from network traffic?

No, edges are meant to indicate one or multiple ongoing TCP connections.

How can i say "hey, these 4 containers represent one application and they are connected to each other using the overlay network and i want to see them connected all the time even if there is no traffic between them?"

There is no way to do that right now, as I mentioned, edges are meant to indicate network traffic.

Another question - i do not see the Application tab in the my UI

Where did you see that specifically?

2opremio avatar Oct 18 '16 10:10 2opremio

Here you can see in the screenshot "Applications". My guess is that it was renamed to Processes based on this quote: "Click on Applications to show all processes communicating in your network. This is the most granular view of Weave Scope. Weave Scope collects information in a flexible data model, which makes it possible to visualize nearly all possible transformations of your infrastructure setup."

https://www.weave.works/guides/monitor-docker-containers/

https://www.weave.works/wp-content/uploads/guides/images/weave-scope/weave-scope-database-metrics.png

Imagine a docker swarm cluster with multiple nodes and many stacks running on all hosts. Without any grouping i'll see a bunch of containers that will be linked to one another from time to time (when there is traffic)....Not very user friendly.

But scope is a good tool - just needs to be enhanced to cover these cases.

I looked at dynatrace (https://www.dynatrace.com/technologies/cloud-and-microservices/docker-monitoring/) but it's paid and it looks like it has the same issue:

Dynatrace automatically discovers all microservices running in your Docker environment. You immediately see a real-time view of all the connections between your containerized processes, across your hosts and cloud instances.

If this means "tcp connections" then i'll see the same output as with scope.

pgeorgiev333 avatar Oct 18 '16 11:10 pgeorgiev333

Here you can see in the screenshot "Applications". My guess is that it was renamed to Processes

Correct, those screenshots are outdated. I created https://github.com/weaveworks/guides/issues/217 to track this

Imagine a docker swarm cluster with multiple nodes and many stacks running on all hosts. Without any grouping i'll see a bunch of containers that will be linked to one another from time to time (when there is traffic)....Not very user friendly.

Will https://github.com/weaveworks/scope/pull/1895 help? It will allow you to add extra filter buttons for your containers based on their labels. For instance, passing --app.container-label-filter='Main Application:com.acme.role=main' to Scope at launch will add an extra filter switch (Main Application), showing the containers with label com.acme.role=main

If this means "tcp connections" then i'll see the same output as with scope.

Your reasoning seems right

2opremio avatar Oct 18 '16 11:10 2opremio

Will #1895 help

I think it will. Thanks

I'll close this issue

pgeorgiev333 avatar Oct 18 '16 11:10 pgeorgiev333