Merge "Allow to collect HAProxy stats and log them in a file"
This commit is contained in:
commit
b6d2d64b29
|
@ -8,6 +8,7 @@
|
||||||
name:
|
name:
|
||||||
- gzip
|
- gzip
|
||||||
- rsync
|
- rsync
|
||||||
|
- socat
|
||||||
- tar
|
- tar
|
||||||
|
|
||||||
- name: Prepare directory with extra logs
|
- name: Prepare directory with extra logs
|
||||||
|
@ -92,6 +93,13 @@
|
||||||
nova list &> /var/log/extra/nova_list.txt;
|
nova list &> /var/log/extra/nova_list.txt;
|
||||||
fi
|
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
|
- name: lsmod
|
||||||
shell: "lsmod &> /var/log/extra/lsmod.txt"
|
shell: "lsmod &> /var/log/extra/lsmod.txt"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue