nicolargo / glances

Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, Mac OS and Windows operating systems.
http://nicolargo.github.io/glances/
Other
25.6k stars 1.46k forks source link

Monitoring network adapters #2072

Closed CodeAnthem closed 2 days ago

CodeAnthem commented 2 years ago

Describe the bug Glances doesn't monitor traffic of network usage inside docker

To Reproduce Steps to reproduce the behavior:

  1. Add a macvlan network to glances
  2. Exec into glances and ping a host inside the network -> shows usage
  3. Exec into another container in the same network, ping a host inside the network (not glances) -> shows no usage

Expected behavior I expect to see usage of the network adapter of other containers inside the monitored network

Desktop (please complete the following information):

Additional context Since I use traefik I can't use network host

nicolargo commented 1 year ago

Glances uses the default Docker API to grab the network usage.

Is it working if you use the "docker stats" command line instead of Glances ?

mamema commented 1 year ago

docker stats doesn't show any eth ....

CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS bd6b628457ec nervous_jemison 0.00% 150.1MiB / 78.56GiB 0.19% 316MB / 7.41MB 14.5MB / 904MB 6

CodeAnthem commented 1 year ago

Hi, honestly I don't know how to use docker stats, if I do docker stats containername (of other container which uses the eth connection I'd like to monitor, I can't see any useful information, besides some network traffic, but not the actual bandwith usage.

nicolargo commented 1 year ago

@averon420 Just run 'docker stats'

The 6 column show the NET I/O

CodeAnthem commented 1 year ago

@averon420 Just run 'docker stats'

The 6 column show the NET I/O

Then I see the traffic usage of all containers, which is not the actually bandwith. But yesI can see it.

nicolargo commented 1 year ago

The nitrate is compute by Glances based on the same metrics. So it should work... You should wait more or less 6 seconds after Glances start in order to see it.

Also try this to investigate:

glances --stdout docker

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 3 months with no activity.