With #1743 merged in v1.24.0, network metrics can not be acquired in EC2/Bridge mode.
Before:
root@ebb5c8c90634:/# curl -s ${ECS_CONTAINER_METADATA_URI}/stats | jq .networks
{
"eth0": {
"rx_bytes": 17331985,
"tx_packets": 932,
"rx_packets": 1353,
"tx_bytes": 77755
}
}
After:
root@5291861e33b5:/# curl -s ${ECS_CONTAINER_METADATA_URI} | jq .Networks
[
{
"NetworkMode": "bridge",
"IPv4Addresses": [
"172.17.0.8"
]
}
]
root@5291861e33b5:/# curl -s ${ECS_CONTAINER_METADATA_URI}/stats | jq .networks
null
If you change struct to StatsJSON of github.com/docker/docker/api/types, it seems to solve the problem.
How about that?
Hi @hayajo,
Thanks for reporting the issue. I can reproduce this on my end same as what you described. I will mark this as a bug and we will work on implementing a fix for this.
closing - fixed in v1.26.1 release
Thank you! I confirmed that.
Most helpful comment
Hi @hayajo,
Thanks for reporting the issue. I can reproduce this on my end same as what you described. I will mark this as a bug and we will work on implementing a fix for this.