timmy/timmy_data/rq/scripts/haproxy-stats-html
Dmitry Sutyagin 1a3a1d55cb Add: collect haproxy stats
Change-Id: If93339e7007c6d279128bc080ab7db2c5389870b
(cherry picked from commit 49900d09eb798afbfa22a884c05f9f5e28f8e320)
2016-12-05 20:08:39 +00:00

6 lines
149 B
Plaintext

ip=$(grep -Ir 'bind' /etc/haproxy/* | perl -n -e '/bind (\d+\.\d+\.\d+\.\d+):10000/ && print $1')
if [ -n "$ip" ]
then
curl http://$ip:10000/
fi