#!/bin/bash
for ip in 10.69.69.1 10.69.69.3 10.69.69.4 10.69.69.5 10.69.69.6; do
    echo -n "$ip: "
    data=$(curl -sf "http://$ip:8366/health" 2>/dev/null)
    if [ -n "$data" ]; then
        echo "$data" | python3 -c 'import sys,json; d=json.load(sys.stdin); print("v"+d["version"]+" node="+d["node"]+" status="+d["status"])'
    else
        echo "unreachable"
    fi
done
