23 lines
561 B
Bash
Executable File
23 lines
561 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
ROOT="$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)"
|
|
COMPOSE_FILE="$ROOT/docker-compose.yml"
|
|
|
|
cd "$ROOT"
|
|
docker compose -f "$COMPOSE_FILE" ps
|
|
echo "---"
|
|
python3 - <<'PY'
|
|
import urllib.request
|
|
|
|
for name, url in [
|
|
("collector", "http://127.0.0.1:8081/healthz"),
|
|
("n8n", "http://127.0.0.1:5670/healthz"),
|
|
]:
|
|
try:
|
|
with urllib.request.urlopen(url, timeout=5) as resp:
|
|
print(f"{name}: {resp.status} {resp.read().decode('utf-8', 'ignore')[:200]}")
|
|
except Exception as exc:
|
|
print(f"{name}: ERROR {exc}")
|
|
PY
|