Fix observabilityclient-dsvm-functional job

There were some changes to the sg-core devstack plugin, to
which we need to react. These changes are similar to what
was done in the telemetry-tempest-plugin recently:
https://review.opendev.org/c/openstack/telemetry-tempest-plugin/+/945108
https://review.opendev.org/c/openstack/telemetry-tempest-plugin/+/937371

Use PROMETHEUS_CUSTOM_SCRAPE_TARGETS to pass sg_core scrape endpoint

https://review.opendev.org/c/openstack/devstack-plugin-prometheus/+/950476
adds the support for passing custom prometheus scrape target in d-p-p.

Let's use the same to pass sg_core endpoint.

Cherry-picked from these 2 commits on master, without conflicts
(both at once need to be applied to pass CI):
2fc3646ac5
34781c5e4f

Change-Id: I5c1885a3ca9d732d41db140a0feb4c87925b5a48
Co-Authored-By: Chandan Kumar (raukadah) <chkumar@redhat.com>
Signed-off-by: Elod Illes <elod.illes@est.tech>
Signed-off-by: Jaromir Wysoglad <jwysogla@redhat.com>
This commit is contained in:
Jaromir Wysoglad
2025-04-09 07:57:49 -04:00
parent d2884e48ce
commit 93a969a99f
3 changed files with 14 additions and 6 deletions

View File

@@ -8,16 +8,24 @@
required-projects:
- openstack/python-observabilityclient
- openstack/ceilometer
- infrawatch/sg-core
- openstack-k8s-operators/sg-core
- openstack/devstack-plugin-prometheus
timeout: 4200
vars:
devstack_localrc:
USE_PYTHON3: True
PROMETHEUS_SERVICE_SCRAPE_TARGETS: prometheus,sg-core
CEILOMETER_BACKEND: sg-core
PROMETHEUS_CUSTOM_SCRAPE_TARGETS: "localhost:3000,localhost:9090"
devstack_plugins:
sg-core: https://github.com/infrawatch/sg-core
sg-core: https://github.com/openstack-k8s-operators/sg-core
ceilometer: https://opendev.org/openstack/ceilometer
devstack-plugin-prometheus: https://opendev.org/openstack/devstack-plugin-prometheus
devstack_services:
node_exporter: false
zuul_copy_output:
/etc/prometheus/prometheus.yml: logs
/etc/openstack/prometheus.yaml: logs
- project:
queue: telemetry

View File

@@ -88,7 +88,7 @@ class CliTestFunctionalRBACEnabled(base.CliTestCase):
metric["__name__"]
)
self.assertEqual(
"sg-core",
"custom",
metric["job"]
)
@@ -103,7 +103,7 @@ class CliTestFunctionalRBACEnabled(base.CliTestCase):
metric["__name__"]
)
self.assertEqual(
"sg-core",
"custom",
metric["job"]
)

View File

@@ -52,7 +52,7 @@ class PythonAPITestFunctionalRBACEnabled(base.PythonAPITestCase):
for metric in ret:
self.assertEqual("ceilometer_image_size",
metric.labels["__name__"])
self.assertEqual("sg-core",
self.assertEqual("custom",
metric.labels["job"])
def test_query(self):
@@ -62,7 +62,7 @@ class PythonAPITestFunctionalRBACEnabled(base.PythonAPITestCase):
for metric in ret:
self.assertEqual("ceilometer_image_size",
metric.labels["__name__"])
self.assertEqual("sg-core", metric.labels["job"])
self.assertEqual("custom", metric.labels["job"])
class PythonAPITestFunctionalAdminCommands(base.PythonAPITestCase):