Skip to content

Commit 6356c85

Browse files
ayefimov-1mgirgisfvyzigold
authored
Alexy metrics (#245)
* [Zuul] Update files_list to be in the project (#240) (#243) * Update files list in zuul.yaml to be in the project Co-authored-by: Marihan Girgis <[email protected]> * [Zuul] Update files_list to be in the project (#240) (#244) * Update files list in zuul.yaml to be in the project Co-authored-by: Marihan Girgis <[email protected]> * add mariadb task file * Update main.yml add mariadb task file * Update main.yml * Update roles/telemetry_verify_metrics/tasks/verify_mariadb_metrics.yml --------- Co-authored-by: Marihan Girgis <[email protected]> Co-authored-by: Jaromír Wysoglad <[email protected]>
1 parent e2bac44 commit 6356c85

File tree

4 files changed

+64
-1
lines changed

4 files changed

+64
-1
lines changed

.zuul.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
vars:
88
patch_openstackversions: true
99
cifmw_extras:
10-
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}/scenarios/centos-9/multinode-ci.yml"
10+
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}/scenarios/centos-9/multinode-ci.yml"
1111
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-autoscaling.yml"
1212
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-functional-test.yml"
1313
- "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-use-master-containers.yml"

roles/telemetry_verify_metrics/defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ telemetry_verify_metrics_metric_sources_to_test:
88
- rabbitmq
99
- kepler
1010
- openstack_network_exporter
11+
- mariadb
1112
# NOTE: IPMI metrics can only be verified when compute nodes are baremetal
1213
# - ceilometer_ipmi_agent

roles/telemetry_verify_metrics/tasks/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@
7979
tags: test
8080
when: '"openstack_network_exporter" in telemetry_verify_metrics_metric_sources_to_test'
8181

82+
- name: Verify MariaDB metrics are being exposed and stored
83+
ansible.builtin.include_tasks:
84+
file: verify_mariadb_metrics.yml
85+
tags: test
86+
when: '"mariadb" in telemetry_verify_metrics_metric_sources_to_test'
87+
8288
- name: Check if kepler test VM is running
8389
ansible.builtin.shell: |
8490
{{ openstack_cmd }} server show {{ kepler_test_vm }} -c status -f value
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
- name: Verify mariadb scrapeconfig exists
2+
ansible.builtin.include_role:
3+
name: common
4+
vars:
5+
common_cr_test_id: RHOSO-xxxx
6+
common_cr_list:
7+
- kind: scrapeconfigs.monitoring.rhobs
8+
name: telemetry-mysqld-exporter
9+
10+
- name: Get galera CR names
11+
ansible.builtin.shell: |
12+
oc get galeras -o custom-columns=NAME:.metadata.name --no-headers
13+
register: cr_names
14+
changed_when: false
15+
failed_when: cr_names.rc >= 1 or cr_names.stdout == ""
16+
17+
- name: Create galera pod list
18+
ansible.builtin.set_fact:
19+
galera_pod_list: "{{ galera_pod_list | default([]) + [item + '-galera-0'] }}"
20+
loop: "{{ cr_names.stdout_lines }}"
21+
22+
- name: List galera pod names
23+
ansible.builtin.debug:
24+
msg: "galara pod name ... {{ item }}"
25+
loop: "{{ galera_pod_list }}"
26+
27+
- name: Verify galera and mysqld-exporter pods are running
28+
ansible.builtin.include_role:
29+
name: common
30+
vars:
31+
common_pod_test_id: RHOSO-xxxx
32+
common_pod_status_str: "Running"
33+
common_pod_nspace: openstack
34+
common_pod_list: "{{ galera_pod_list + ['mysqld-exporter-0'] }}"
35+
36+
- name: |
37+
TEST Check mariadb metric endpoints
38+
RHOSO-xxxx
39+
ansible.builtin.shell: |
40+
oc rsh openstackclient curl https://mysqld-exporter.openstack.svc:9104/probe?{{ item }}.openstack.svc.3306&auth_module=client.{{ item }}.openstack.svc
41+
register: result
42+
changed_when: false
43+
failed_when: result.rc >= 1
44+
loop: "{{ cr_names.stdout_lines }}"
45+
46+
- name: |
47+
TEST Use openstack observabilityclient to verify mariadb metrics are stored in prometheus
48+
RHOSO-xxxx
49+
ansible.builtin.shell: |
50+
{{ openstack_cmd }} metric query --disable-rbac mysql_version_info{instance=\'{{ item }}.openstack.svc:3306\'}
51+
register: result
52+
delay: 30
53+
retries: 10
54+
changed_when: false
55+
until: result.rc == 0 and "mysql_version_info" in result.stdout
56+
loop: "{{ cr_names.stdout_lines }}"

0 commit comments

Comments
 (0)