scripts/nym: status.sh probe container and HTTP API
This commit is contained in:
parent
4b6038ae68
commit
0f343eba5b
1 changed files with 13 additions and 0 deletions
13
scripts/nym/status.sh
Executable file
13
scripts/nym/status.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Probe koopa-nym container + local HTTP API
|
||||||
|
set -euo pipefail
|
||||||
|
HTTP="${NYM_HTTP:-http://127.0.0.1:9080}"
|
||||||
|
echo "=== podman ==="
|
||||||
|
podman ps -a --filter name=koopa-nym --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}' || true
|
||||||
|
echo "=== listen ==="
|
||||||
|
ss -lntp 2>/dev/null | grep -E '9080|1789|1790|19000|51822' || true
|
||||||
|
echo "=== api /roles ==="
|
||||||
|
curl -sS -m 5 "${HTTP}/api/v1/roles" 2>/dev/null | head -c 500 || echo "(unreachable)"
|
||||||
|
echo
|
||||||
|
echo "=== api /health (if present) ==="
|
||||||
|
curl -sS -m 3 -o /dev/null -w "http=%{http_code}\n" "${HTTP}/api/v1/health" 2>/dev/null || true
|
||||||
Loading…
Add table
Add a link
Reference in a new issue