refactor: updated edge probing
This commit is contained in:
parent
566651131d
commit
2ef9444bc6
1 changed files with 9 additions and 8 deletions
13
generate.sh
13
generate.sh
|
@ -41,9 +41,10 @@ get_edge_state () {
|
|||
location=$1
|
||||
edge=$2
|
||||
|
||||
instance="edge$edge-$(echo "$location" | cut -d. -f1).transfer.recycled.cloud"
|
||||
instance="edge$edge.$location.recycled.cloud"
|
||||
job="blackbox-external-icmpv6"
|
||||
result=$(query $EXTERNAL_PROMETHEUS_ADDR \
|
||||
"probe_success{instance=\"$instance\"}")
|
||||
"probe_success{instance=\"$instance\", job=\"$job\"}")
|
||||
|
||||
get_state "$result"
|
||||
}
|
||||
|
@ -84,8 +85,8 @@ for location in $LOCATIONS; do
|
|||
canary_v6=$(get_canary_state "$location" 6)
|
||||
canary_v4=$(get_canary_state "$location" 4)
|
||||
|
||||
edge1_transfer=$(get_edge_state "$location" 1)
|
||||
edge2_transfer=$(get_edge_state "$location" 2)
|
||||
edge1=$(get_edge_state "$location" 1)
|
||||
edge2=$(get_edge_state "$location" 2)
|
||||
|
||||
cat <<- EOF
|
||||
<div class="location">
|
||||
|
@ -96,8 +97,8 @@ for location in $LOCATIONS; do
|
|||
<div class="col-6">
|
||||
<h3>Routers</h3>
|
||||
<ul>
|
||||
<li>edge1 <span class="$edge1_transfer">$edge1_transfer</span></li>
|
||||
<li>edge2 <span class="$edge2_transfer">$edge2_transfer</span></li>
|
||||
<li>edge1 <span class="$edge1">$edge1</span></li>
|
||||
<li>edge2 <span class="$edge2">$edge2</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
|
|
Loading…
Reference in a new issue