cosmostat has working drive health dashboard

This commit is contained in:
2026-04-19 14:23:32 -07:00
parent c6007d9c33
commit 46d9f86d55
48 changed files with 4295 additions and 257 deletions

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
# ------------------------------------------------------------------
# Grab the list of IPs
# ------------------------------------------------------------------
readarray -t ips < <(curl -s http://192.168.37.1:5000/client_inventory | grep ansible_host | cut -d: -f2 | awk '{print $1}')
# ------------------------------------------------------------------
# Inspect the result (optional, handy for debugging)
# ------------------------------------------------------------------
echo "Found ${#ips[@]} IP(s):"
for ip in "${ips[@]}"; do
echo " $ip"
done
# ------------------------------------------------------------------
# Use the array for example, SSH into each host
# ------------------------------------------------------------------
USER="root"
KEY="~/.ssh/id_rsa"
PORT=22
for host in "${ips[@]}"; do
echo "=== SSHing to $host ==="
ssh -o BatchMode=yes -p "$PORT" -i "$KEY" "$USER@$host" "hostname && docker ps --format=json | jq -r '.Names' | grep cosmostat"
echo
done