rancher / rancher

Complete container management platform
http://rancher.com
Apache License 2.0
23.36k stars 2.96k forks source link

Docker stats shows no net-metrics for containers deployed in managed network #7261

Closed i-doit181 closed 6 years ago

i-doit181 commented 7 years ago

Rancher Version: v1.2.2 Docker Version: v1.11.2-v1.12.5 OS and where are the hosts located? (cloud, bare metal, etc): cloud with Ubuntu 15.10(4.2.0) VMs (Vagrant) with RancherOS (4.4.10) Setup Details: (single node rancher vs. HA rancher, internal DB vs. external DB) single node rancher and internal DB Environment Type: (Cattle/Kubernetes/Swarm/Mesos) Cattle Steps to Reproduce: Deploying a stack with managed network Results: docker stats shows no metrics for NET I/O for containers in managed network. A look on docker inspect none shows that containers in managed network are deployed with NetworkMode=none Expected: Metrics for NET I/O where traffic is going through containers

willmasters commented 7 years ago

This is indeed true of Rancher 1.3 as well. I'm using Telegraf and InfluxDB to access data from the Docker stats api and if your Cattle stack is managed there is no such networking metadata. I assumed this was by design. When changing the network from managed to bridged, it becomes available.

i-doit181 commented 7 years ago

Yes but I have an use case where i cannot change network mode from managed to bridged

willmasters commented 7 years ago

Yes so do I, I think most use cases based on Rancher probably require managed.

eesprit commented 7 years ago

+1 having network stats provided in a standard way (via docker stats) is a real need, as it could then be used by standard tools (like Telegraf).

The rancher stats API which provides those network metrics (by the use of network namespace calls) is actually pretty hard to manipulate/use (websocket, needs to renew the token frequently, does not see new containers appearing during the current session, fixed refresh rate of 1 second, etc.) and not easily usable with existing tools.

garceri commented 6 years ago

We need a way to monitor container network usage, this is a big issue for us, would it be possible for rancher to expose these metrics in an easy format that can be read by most monitoring tools ?

parinapatel commented 6 years ago

Any progress on this ?

deniseschannon commented 6 years ago

With the release of Rancher 2.0, development on v1.6 is only limited to critical bug fixes and security patches.