diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 6837b3adf837b983862fc3864e519001111210f8..0786f6ee2a20e6f0930996df537c8240aa39ae97 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -1288,6 +1288,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 be4febed04df8727a6b71995571edf3d0f5eff0b..e935f15102c53f651e96d0f97c193d35e32726ce 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 0000000000000000000000000000000000000000..cfd6451c836bc297e5c16682072dc4132115f954 --- /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.