linux-node-visability/reload-prom.sh

5 lines
247 B
Bash
Raw Normal View History

2024-10-06 01:54:18 +00:00
IP=$(sudo docker ps | grep prometheus | grep -v node | awk '{print $1}' | xargs -I{} sudo docker inspect {} | grep IPAddress | tail -n 1 | awk '{print $2}' | sed -n '1 s/"//gp' | sed -n '1 s/,//gp')
echo $IP
curl -X POST http://$IP:9090/-/reload