refactor: updated edge probing
This commit is contained in:
parent
566651131d
commit
2ef9444bc6
1 changed files with 9 additions and 8 deletions
17
generate.sh
17
generate.sh
|
@ -41,9 +41,10 @@ get_edge_state () {
|
||||||
location=$1
|
location=$1
|
||||||
edge=$2
|
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 \
|
result=$(query $EXTERNAL_PROMETHEUS_ADDR \
|
||||||
"probe_success{instance=\"$instance\"}")
|
"probe_success{instance=\"$instance\", job=\"$job\"}")
|
||||||
|
|
||||||
get_state "$result"
|
get_state "$result"
|
||||||
}
|
}
|
||||||
|
@ -84,8 +85,8 @@ for location in $LOCATIONS; do
|
||||||
canary_v6=$(get_canary_state "$location" 6)
|
canary_v6=$(get_canary_state "$location" 6)
|
||||||
canary_v4=$(get_canary_state "$location" 4)
|
canary_v4=$(get_canary_state "$location" 4)
|
||||||
|
|
||||||
edge1_transfer=$(get_edge_state "$location" 1)
|
edge1=$(get_edge_state "$location" 1)
|
||||||
edge2_transfer=$(get_edge_state "$location" 2)
|
edge2=$(get_edge_state "$location" 2)
|
||||||
|
|
||||||
cat <<- EOF
|
cat <<- EOF
|
||||||
<div class="location">
|
<div class="location">
|
||||||
|
@ -94,14 +95,14 @@ for location in $LOCATIONS; do
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<h3>Routers</h3>
|
<h3>Routers</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>edge1 <span class="$edge1_transfer">$edge1_transfer</span></li>
|
<li>edge1 <span class="$edge1">$edge1</span></li>
|
||||||
<li>edge2 <span class="$edge2_transfer">$edge2_transfer</span></li>
|
<li>edge2 <span class="$edge2">$edge2</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-6">
|
||||||
<h3>Canary VM</h3>
|
<h3>Canary VM</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>IPv6 <span class="$canary_v6">$canary_v6</span></li>
|
<li>IPv6 <span class="$canary_v6">$canary_v6</span></li>
|
||||||
<li>IPv4 <span class="$canary_v4">$canary_v4</span></li>
|
<li>IPv4 <span class="$canary_v4">$canary_v4</span></li>
|
||||||
|
|
Loading…
Reference in a new issue