diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 288b3c3415..695f7a85a3 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -1292,6 +1292,7 @@ enable_prometheus_etcd_integration: "{{ enable_prometheus | bool and enable_etcd enable_prometheus_msteams: "no" prometheus_alertmanager_user: "admin" +prometheus_ceph_exporter_interval: "{{ prometheus_scrape_interval }}" prometheus_grafana_user: "grafana" prometheus_scrape_interval: "60s" prometheus_openstack_exporter_interval: "{{ prometheus_scrape_interval }}" diff --git a/ansible/roles/prometheus/templates/prometheus.yml.j2 b/ansible/roles/prometheus/templates/prometheus.yml.j2 index f69281b6ff..9cb76ab4b8 100644 --- a/ansible/roles/prometheus/templates/prometheus.yml.j2 +++ b/ansible/roles/prometheus/templates/prometheus.yml.j2 @@ -125,6 +125,7 @@ scrape_configs: {% if enable_prometheus_ceph_mgr_exporter | bool %} - job_name: ceph_mgr_exporter honor_labels: true + scrape_interval: {{ prometheus_ceph_exporter_interval }} static_configs: - targets: {% for exporter in prometheus_ceph_mgr_exporter_endpoints %} diff --git a/releasenotes/notes/add-ceph-metrics-scrape-interval-3ee39fba696860e9.yaml b/releasenotes/notes/add-ceph-metrics-scrape-interval-3ee39fba696860e9.yaml new file mode 100644 index 0000000000..cfd6451c83 --- /dev/null +++ b/releasenotes/notes/add-ceph-metrics-scrape-interval-3ee39fba696860e9.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds a new variable ``prometheus_ceph_exporter_interval`` for controlling + Ceph's metrics scrape interval.