From ea556596f5028923a93cbdfc7c56bfcb87c8dff4 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Tue, 27 Feb 2024 04:41:31 -0500 Subject: [PATCH] Gather telemetry services statuses --- collection-scripts/gather_services_status | 29 +++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/collection-scripts/gather_services_status b/collection-scripts/gather_services_status index f6a4f1e..8da20b4 100755 --- a/collection-scripts/gather_services_status +++ b/collection-scripts/gather_services_status @@ -38,8 +38,14 @@ get_status() { get_placement_status ;; "ironic") - get_ironic_status - ;; + get_ironic_status + ;; + "aodh") + get_aodh_status + ;; + "ceilometer") + get_ceilometer_status + ;; *) ;; esac } @@ -137,6 +143,25 @@ get_ironic_status() { # have the required elevated rights "out of the" box to gather it. } +# Aodh service gathering - alarms +get_aodh_status() { + local AODH_PATH="$BASE_COLLECTION_PATH/ctlplane/aodh" + mkdir -p "$AODH_PATH" + run_bg ${BASH_ALIASES[os]} alarm list '>' "$AODH_PATH"/alarm_list +} + +# Ceilometer, sg-core, prometheus service gathering - metrics +get_ceilometer_status() { + local CEILOMETER_PATH="$BASE_COLLECTION_PATH/ctlplane/ceilometer" + if /usr/bin/oc -n openstack get metricstorage metric-storage &> /dev/null; then + # For `openstack metric list` command to work we need ceilometer + # in the openstack as well as metricstorage deployed + # on openshift. + mkdir -p "$CEILOMETER_PATH" + run_bg ${BASH_ALIASES[os]} metric list --disable-rbac '>' "$CEILOMETER_PATH"/metric_list + fi +} + # first we gather generic status of the openstack ctlplane # then we process the existing services (if an associated # function has been defined)