Add ceph metrics to postrun metrics gathering role
This updates the gather-prom-metrics role to include gathering metrics from the active ceph-mgr endpoint Change-Id: Icb5d27b6a070e9065f6276725bf06dec7d2cbc0d Signed-off-by: Steve Wilkerson <sw5822@att.com>
This commit is contained in:
parent
6ca136bae4
commit
ef4cbb3b08
@ -38,6 +38,26 @@
|
|||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
||||||
|
- name: "Get ceph metrics from ceph-mgr"
|
||||||
|
shell: |-
|
||||||
|
set -e
|
||||||
|
mgr_endpoints=$(kubectl get endpoints -n ceph -l component=manager -o json | jq -r '.items[].subsets[].addresses[].ip')
|
||||||
|
echo "ceph-mgr endpoints: $mgr_endpoints"
|
||||||
|
for endpoint in $mgr_endpoints; do
|
||||||
|
echo "checking ceph-mgr at $endpoint"
|
||||||
|
metrics_curl="curl $endpoint:9283/metrics"
|
||||||
|
op=$(eval "$metrics_curl")
|
||||||
|
if [[ -n $op ]]; then
|
||||||
|
curl $endpoint:9283/metrics >> "{{ logs_dir }}"/prometheus/ceph-ceph-mgr.txt
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo "$endpoint is a standby ceph-mgr. Trying next endpoint"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
args:
|
||||||
|
executable: /bin/bash
|
||||||
|
ignore_errors: True
|
||||||
|
|
||||||
- name: "Downloads logs to executor"
|
- name: "Downloads logs to executor"
|
||||||
synchronize:
|
synchronize:
|
||||||
src: "{{ logs_dir }}/prometheus"
|
src: "{{ logs_dir }}/prometheus"
|
||||||
|
Loading…
Reference in New Issue
Block a user