feat: added upstreams
This commit is contained in:
parent
a3fc821533
commit
9c80cce9db
1 changed files with 18 additions and 8 deletions
26
generate.sh
26
generate.sh
|
@ -37,11 +37,11 @@ get_canary_state () {
|
||||||
get_state "$result"
|
get_state "$result"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_edge_state () {
|
get_router_state () {
|
||||||
location=$1
|
location=$1
|
||||||
edge=$2
|
router=$2
|
||||||
|
|
||||||
instance="edge$edge.$location.recycled.cloud"
|
instance="$router.$location.recycled.cloud"
|
||||||
job="blackbox-external-icmpv6"
|
job="blackbox-external-icmpv6"
|
||||||
result=$(query $EXTERNAL_PROMETHEUS_ADDR \
|
result=$(query $EXTERNAL_PROMETHEUS_ADDR \
|
||||||
"probe_success{instance=\"$instance\", job=\"$job\"}")
|
"probe_success{instance=\"$instance\", job=\"$job\"}")
|
||||||
|
@ -82,26 +82,36 @@ cat << EOF
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
for location in $LOCATIONS; do
|
for location in $LOCATIONS; do
|
||||||
|
upstream1=$(get_router_state "$location" 'upstream1')
|
||||||
|
upstream2=$(get_router_state "$location" 'upstream2')
|
||||||
|
|
||||||
|
edge1=$(get_router_state "$location" 'edge1')
|
||||||
|
edge2=$(get_router_state "$location" 'edge2')
|
||||||
|
|
||||||
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=$(get_edge_state "$location" 1)
|
|
||||||
edge2=$(get_edge_state "$location" 2)
|
|
||||||
|
|
||||||
cat <<- EOF
|
cat <<- EOF
|
||||||
<div class="location">
|
<div class="location">
|
||||||
<hr />
|
<hr />
|
||||||
<h2>$location</h2>
|
<h2>$location</h2>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6">
|
<div class="col-4">
|
||||||
|
<h3>Upstreams</h3>
|
||||||
|
<ul>
|
||||||
|
<li>1 <span class="$upstream1">$upstream1</span></li>
|
||||||
|
<li>2 <span class="$upstream2">$upstream2</span></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="col-4">
|
||||||
<h3>Routers</h3>
|
<h3>Routers</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>edge1 <span class="$edge1">$edge1</span></li>
|
<li>edge1 <span class="$edge1">$edge1</span></li>
|
||||||
<li>edge2 <span class="$edge2">$edge2</span></li>
|
<li>edge2 <span class="$edge2">$edge2</span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-6">
|
<div class="col-4">
|
||||||
<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>
|
||||||
|
|
Loading…
Reference in a new issue