Created
January 5, 2022 02:12
-
-
Save prologic/230c9df347ffb19b048a3f9822083ccd to your computer and use it in GitHub Desktop.
PromQL to measure (for Docker containers via cAdvisor) Network Traffic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sum(label_replace( | |
increase(container_network_transmit_bytes_total{image!="", container_label_com_docker_stack_namespace=~"$stack", container_label_com_docker_swarm_service_name=~"$service"}[$__range]) | |
+ | |
increase(container_network_receive_bytes_total{image!="", container_label_com_docker_stack_namespace=~"$stack", container_label_com_docker_swarm_service_name=~"$service"}[$__range]), | |
"task_name", "$1", "container_label_com_docker_swarm_task_name", "(.*\\.[0-9]*).*\\..*")) by (task_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment