Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bz2242346 prometheus port (backport #7613) #7615

Merged
merged 2 commits into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions infrastructure-playbooks/cephadm-adopt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'

- name: With dashboard enabled
when: dashboard_enabled | bool
when: dashboard_enabled | bool and groups.get(monitoring_group_name, []) | length > 0
block:
- name: Update the placement of alertmanager hosts
ceph_orch_apply:
Expand All @@ -1485,6 +1485,7 @@
service_id: "{{ ansible_facts['hostname'] }}"
placement:
label: "{{ monitoring_group_name }}"
count: "{{ groups.get(monitoring_group_name, []) | length }}"
{% if grafana_server_addr is defined %}
networks:
- {{ grafana_server_addr }}
Expand All @@ -1500,7 +1501,18 @@
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'

- name: Update the placement of prometheus hosts
ansible.builtin.command: "{{ cephadm_cmd }} shell -k /etc/ceph/{{ cluster }}.client.admin.keyring --fsid {{ fsid }} -- ceph orch apply prometheus --placement='{{ groups.get(monitoring_group_name, []) | length }} label:{{ monitoring_group_name }}'"
ceph_orch_apply:
fsid: "{{ fsid }}"
spec: |
service_name: prometheus
service_id: "{{ ansible_facts['hostname'] }}"
placement:
label: {{ monitoring_group_name }}
count: {{ groups.get(monitoring_group_name, []) | length }}
{% if prometheus_port is defined and prometheus_port != 9095 %}
spec:
port: {{ prometheus_port }}
{% endif %}
changed_when: false
environment:
CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
Expand Down
Loading