Allow to collect HAProxy stats and log them in a file
Getting HAProxy stats about its backends and health will help when we have issues with timeouts and the like. Closes-Bug: #1803716 Change-Id: Ic787f4ac32bf53c4409d8fd058a976fbb552cb94
This commit is contained in:
parent
b8a8bd1385
commit
442144d0e6
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue