Last active
March 10, 2021 09:16
-
-
Save reutsharabani/fd128ec25786a91e18557afe79e29171 to your computer and use it in GitHub Desktop.
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
# NLBs followed ALBs. | |
# All this does is divides healthy by total (once for NLB and once for ALB) and formats them nicely. | |
label_replace( | |
aws_networkelb_healthy_host_count_average offset 15m / (aws_networkelb_healthy_host_count_average offset 15m + aws_networkelb_un_healthy_host_count_average offset 15m), | |
"target_group", | |
"$2-$3", | |
"target_group", | |
"targetgroup/k8s-([A-Za-z]+)-([A-Za-z]+)-([A-Za-z0-9]+)/(.*)" | |
) | |
or | |
label_replace( | |
aws_applicationelb_healthy_host_count_average offset 15m / (aws_applicationelb_healthy_host_count_average offset 15m + aws_applicationelb_un_healthy_host_count_average offset 15m), | |
"target_group", | |
"$2-$3", | |
"target_group", | |
"targetgroup/k8s-([A-Za-z]+)-([A-Za-z]+)-([A-Za-z0-9]+)/(.*)" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment