@kevink I have written a similar script. However, it’s written to run without needing to expose the dashboard port outside of the container, by using docker exec
to run wget
inside of the container (curl
doesn’t appear to be available in the container).
#!/bin/bash
api() {
docker exec storagenode wget -qO - http://localhost:14002/api/$1
}
for sat in $(api dashboard | jq -r .data.satellites[]); do
api satellite/$sat | jq '{id: .data.id, audit: .data.audit, uptime: .data.uptime}'
done