]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/prometheus: metrics header for standby module
authorNitzan Mordechai <nmordech@redhat.com>
Thu, 11 Dec 2025 06:32:31 +0000 (06:32 +0000)
committerNitzanMordhai <nmordech@ibm.com>
Thu, 5 Feb 2026 12:09:16 +0000 (12:09 +0000)
PR #65245 drop the header set for standby module,
we should still have it.

Fixes: https://tracker.ceph.com/issues/74149
Signed-off-by: Nitzan Mordechai <nmordech@ibm.com>
src/pybind/mgr/cephadm/templates/services/prometheus/prometheus.yml.j2
src/pybind/mgr/prometheus/module.py

index 2afbf606af2b86ea2faadbe7a841c931f9b179e7..2f584bbceb21ed40cac067400ae60b77fd8f2fe8 100644 (file)
@@ -45,6 +45,7 @@ scrape_configs:
 {% for service, urls in service_discovery_cfg.items() %}
  {% if service != 'alertmanager' %}
   - job_name: '{{ service }}'
+    fallback_scrape_protocol: PrometheusText0.0.4
     relabel_configs:
     - source_labels: [__address__]
       target_label: cluster
index f5c8f778521e3890249f222cd701706bed9f0edf..53d7f889dd5fe488507116ee0b67864b04e129c0 100644 (file)
@@ -2330,6 +2330,7 @@ class StandbyModule(MgrStandbyModule):
 
             @cherrypy.expose
             def metrics(self) -> str:
+                cherrypy.response.headers['Content-Type'] = 'text/plain; charset=utf-8'
                 return ''
 
         cherrypy.tree.mount(Root(), '/', {})