Launch offer — 40% off every tier for a limited time. Prices shown are already reduced.
Stacks / Code / Beacon / verify.sh
verify.sh 29 lines · 840 B · bash
#!/usr/bin/env bash
set -uo pipefail
pass=0; fail=0

check() {
  local n="$1" u="$2" c
  c=$(curl -s -o /dev/null -w '%{http_code}' --max-time 8 "$u" || echo 000)
  if [ "$c" != "000" ] && [ "$c" -lt 500 ]; then
    printf '  %-14s OK   (%s)\n' "$n" "$c"; pass=$((pass+1))
  else
    printf '  %-14s FAIL (%s)\n' "$n" "$c"; fail=$((fail+1))
  fi
}

echo 'Checking services...'
check prometheus     "http://localhost:9090/"
check alertmanager   "http://localhost:9093/"
check victoriametrics "http://localhost:8428/"
check thanos         "http://localhost:10902/"
check fluentbit      "http://localhost:2020/"
check otel           "http://localhost:4317/"
check jaeger         "http://localhost:16686/"
check uptimekuma     "http://localhost:3001/"
check superset       "http://localhost:8088/"

echo
echo "passed=$pass failed=$fail"
exit 0