We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a595b5e commit 58d529fCopy full SHA for 58d529f
utils/dockerutil.py
@@ -482,6 +482,12 @@ def get_container_network_mapping(cls, container):
482
483
docker_gateways = {}
484
for netname, netconf in container['NetworkSettings']['Networks'].iteritems():
485
+
486
+ if netname == 'host' or netconf.get(u'Gateway') == '':
487
+ log.debug("Empty network gateway, container %s is in network host mode, "
488
+ "its network metrics are for the whole host." % container['Id'][:12])
489
+ return {'eth0': 'bridge'}
490
491
docker_gateways[netname] = struct.unpack('<L', socket.inet_aton(netconf.get(u'Gateway')))[0]
492
493
mapping = {}
0 commit comments