Merge "Allow to collect HAProxy stats and log them in a file"

This commit is contained in:
Zuul 2018-11-22 22:11:22 +00:00 committed by Gerrit Code Review
commit b6d2d64b29
1 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,7 @@
name:
- gzip
- rsync
- socat
- tar
- name: Prepare directory with extra logs
@ -92,6 +93,13 @@
nova list &> /var/log/extra/nova_list.txt;
fi
- name: Get haproxy stats
shell: >
pgrep haproxy && \
test -S /var/lib/haproxy/stats && \
echo 'show info;show stat;show table' | socat /var/lib/haproxy/stats stdio &> /var/log/extra/haproxy-stats.txt || \
echo "No HAProxy or no socket on host" > /var/log/extra/haproxy-stats.txt
- name: lsmod
shell: "lsmod &> /var/log/extra/lsmod.txt"