diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 39360757ad..b66124d6a9 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -570,9 +570,6 @@ prometheus_alertmanager_cluster_port: "9094" prometheus_alertmanager_public_port: "{{ haproxy_single_external_frontend_public_port if haproxy_single_external_frontend | bool else prometheus_alertmanager_port }}" prometheus_alertmanager_listen_port: "{{ prometheus_alertmanager_port }}" -# Prometheus MSTeams port -prometheus_msteams_port: "9095" - # Prometheus openstack-exporter ports prometheus_openstack_exporter_port: "9198" prometheus_elasticsearch_exporter_port: "9108" @@ -1217,7 +1214,6 @@ enable_prometheus_blackbox_exporter: "{{ enable_prometheus | bool }}" enable_prometheus_rabbitmq_exporter: "{{ enable_prometheus | bool and enable_rabbitmq | bool }}" enable_prometheus_libvirt_exporter: "{{ enable_prometheus | bool and enable_nova | bool and nova_compute_virt_type in ['kvm', 'qemu'] }}" enable_prometheus_etcd_integration: "{{ enable_prometheus | bool and enable_etcd | bool }}" -enable_prometheus_msteams: "no" prometheus_alertmanager_user: "admin" prometheus_ceph_exporter_interval: "{{ prometheus_scrape_interval }}" @@ -1232,7 +1228,6 @@ prometheus_ceph_mgr_exporter_endpoints: [] prometheus_openstack_exporter_endpoint_type: "internal" prometheus_openstack_exporter_compute_api_version: "latest" prometheus_libvirt_exporter_interval: "60s" -prometheus_msteams_webhook_url: prometheus_public_endpoint: "{{ prometheus_external_fqdn | kolla_url(public_protocol, prometheus_public_port) }}" prometheus_internal_endpoint: "{{ prometheus_internal_fqdn | kolla_url(internal_protocol, prometheus_port) }}" diff --git a/ansible/inventory/all-in-one b/ansible/inventory/all-in-one index 77514bfe8b..8d5c22344a 100644 --- a/ansible/inventory/all-in-one +++ b/ansible/inventory/all-in-one @@ -555,9 +555,6 @@ monitoring [prometheus-libvirt-exporter:children] compute -[prometheus-msteams:children] -prometheus-alertmanager - [masakari-api:children] control diff --git a/ansible/inventory/multinode b/ansible/inventory/multinode index c05a042732..a12c51dc9a 100644 --- a/ansible/inventory/multinode +++ b/ansible/inventory/multinode @@ -574,9 +574,6 @@ monitoring [prometheus-libvirt-exporter:children] compute -[prometheus-msteams:children] -prometheus-alertmanager - [masakari-api:children] control diff --git a/ansible/roles/prometheus/defaults/main.yml b/ansible/roles/prometheus/defaults/main.yml index e2e7d75525..f248ae0d54 100644 --- a/ansible/roles/prometheus/defaults/main.yml +++ b/ansible/roles/prometheus/defaults/main.yml @@ -122,14 +122,6 @@ prometheus_services: image: "{{ prometheus_libvirt_exporter_image_full }}" volumes: "{{ prometheus_libvirt_exporter_default_volumes + prometheus_libvirt_exporter_extra_volumes }}" dimensions: "{{ prometheus_libvirt_exporter_dimensions }}" - prometheus-msteams: - container_name: "prometheus_msteams" - group: "prometheus-msteams" - enabled: "{{ enable_prometheus_msteams | bool }}" - environment: "{{ prometheus_msteams_container_proxy }}" - image: "{{ prometheus_msteams_image_full }}" - volumes: "{{ prometheus_msteams_default_volumes + prometheus_msteams_extra_volumes }}" - dimensions: "{{ prometheus_msteams_dimensions }}" #################### # Prometheus Server @@ -235,10 +227,6 @@ prometheus_libvirt_exporter_image: "{{ docker_registry ~ '/' if docker_registry prometheus_libvirt_exporter_tag: "{{ prometheus_tag }}" prometheus_libvirt_exporter_image_full: "{{ prometheus_libvirt_exporter_image }}:{{ prometheus_libvirt_exporter_tag }}" -prometheus_msteams_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ docker_image_name_prefix }}prometheus-msteams" -prometheus_msteams_tag: "{{ prometheus_tag }}" -prometheus_msteams_image_full: "{{ prometheus_msteams_image }}:{{ prometheus_msteams_tag }}" - prometheus_server_dimensions: "{{ default_container_dimensions }}" prometheus_mysqld_exporter_dimensions: "{{ default_container_dimensions }}" prometheus_node_exporter_dimensions: "{{ default_container_dimensions }}" @@ -249,7 +237,6 @@ prometheus_openstack_exporter_dimensions: "{{ default_container_dimensions }}" prometheus_elasticsearch_exporter_dimensions: "{{ default_container_dimensions }}" prometheus_blackbox_exporter_dimensions: "{{ default_container_dimensions }}" prometheus_libvirt_exporter_dimensions: "{{ default_container_dimensions }}" -prometheus_msteams_dimensions: "{{ default_container_dimensions }}" prometheus_server_default_volumes: - "{{ node_config_directory }}/prometheus-server/:{{ container_config_directory }}/:ro" @@ -309,11 +296,6 @@ prometheus_libvirt_exporter_default_volumes: - "/etc/localtime:/etc/localtime:ro" - "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}" - "/run/libvirt:/run/libvirt:ro" -prometheus_msteams_default_volumes: - - "{{ node_config_directory }}/prometheus-msteams/:{{ container_config_directory }}/:ro" - - "/etc/localtime:/etc/localtime:ro" - - "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}" - - "kolla_logs:/var/log/kolla/" prometheus_extra_volumes: "{{ default_extra_volumes }}" prometheus_server_extra_volumes: "{{ prometheus_extra_volumes }}" @@ -326,9 +308,6 @@ prometheus_openstack_exporter_extra_volumes: "{{ prometheus_extra_volumes }}" prometheus_elasticsearch_exporter_extra_volumes: "{{ prometheus_extra_volumes }}" prometheus_blackbox_exporter_extra_volumes: "{{ prometheus_extra_volumes }}" prometheus_libvirt_exporter_extra_volumes: "{{ prometheus_extra_volumes }}" -prometheus_msteams_extra_volumes: "{{ prometheus_extra_volumes }}" - -prometheus_msteams_container_proxy: "{{ container_proxy }}" prometheus_openstack_exporter_disabled_volume: "{{ '--disable-service.volume' if not enable_cinder | bool else '' }}" prometheus_openstack_exporter_disabled_dns: "{{ '--disable-service.dns' if not enable_designate | bool else '' }}" diff --git a/ansible/roles/prometheus/handlers/main.yml b/ansible/roles/prometheus/handlers/main.yml index dcdb7578d0..cf5a14abe7 100644 --- a/ansible/roles/prometheus/handlers/main.yml +++ b/ansible/roles/prometheus/handlers/main.yml @@ -150,19 +150,3 @@ dimensions: "{{ service.dimensions }}" when: - kolla_action != "config" - -- name: Restart prometheus-msteams container - vars: - service_name: "prometheus-msteams" - service: "{{ prometheus_services[service_name] }}" - become: true - kolla_container: - action: "recreate_or_restart_container" - common_options: "{{ docker_common_options }}" - environment: "{{ service.environment }}" - name: "{{ service.container_name }}" - image: "{{ service.image }}" - volumes: "{{ service.volumes }}" - dimensions: "{{ service.dimensions }}" - when: - - kolla_action != "config" diff --git a/ansible/roles/prometheus/tasks/config.yml b/ansible/roles/prometheus/tasks/config.yml index 52a4d335d8..bd1918384d 100644 --- a/ansible/roles/prometheus/tasks/config.yml +++ b/ansible/roles/prometheus/tasks/config.yml @@ -234,33 +234,3 @@ base: "{{ node_custom_config }}/prometheus/" service: "{{ prometheus_services['prometheus-server'] }}" when: service | service_enabled_and_mapped_to_host - -- name: Copying over prometheus msteams config file - vars: - service: "{{ prometheus_services['prometheus-msteams'] }}" - template: - src: "{{ item }}" - dest: "{{ node_config_directory }}/prometheus-msteams/msteams.yml" - become: true - when: service | service_enabled_and_mapped_to_host - with_first_found: - - "{{ node_custom_config }}/prometheus/{{ inventory_hostname }}/prometheus-msteams.yml" - - "{{ node_custom_config }}/prometheus/prometheus-msteams.yml" - - "{{ role_path }}/templates/prometheus-msteams.yml.j2" - notify: - - Restart prometheus-msteams container - -- name: Copying over prometheus msteams template file - vars: - service: "{{ prometheus_services['prometheus-msteams'] }}" - copy: - src: "{{ item }}" - dest: "{{ node_config_directory }}/prometheus-msteams/msteams.tmpl" - become: true - when: service | service_enabled_and_mapped_to_host - with_first_found: - - "{{ node_custom_config }}/prometheus/{{ inventory_hostname }}/prometheus-msteams.tmpl" - - "{{ node_custom_config }}/prometheus/prometheus-msteams.tmpl" - - "{{ role_path }}/templates/prometheus-msteams.tmpl" - notify: - - Restart prometheus-msteams container diff --git a/ansible/roles/prometheus/tasks/precheck.yml b/ansible/roles/prometheus/tasks/precheck.yml index 4aea7ed218..8b48dc138f 100644 --- a/ansible/roles/prometheus/tasks/precheck.yml +++ b/ansible/roles/prometheus/tasks/precheck.yml @@ -21,7 +21,6 @@ - prometheus_elasticsearch_exporter - prometheus_blackbox_exporter - prometheus_libvirt_exporter - - prometheus_msteams check_mode: false register: container_facts @@ -185,17 +184,3 @@ - enable_prometheus_libvirt_exporter | bool with_items: - "{{ prometheus_libvirt_exporter_port }}" - -- name: Checking free ports for Prometheus msteams - wait_for: - host: "{{ 'api' | kolla_address }}" - port: "{{ item }}" - connect_timeout: 1 - timeout: 1 - state: stopped - when: - - container_facts['prometheus_msteams'] is not defined - - inventory_hostname in groups['prometheus-msteams'] - - enable_prometheus_msteams | bool - with_items: - - "{{ prometheus_msteams_port }}" diff --git a/ansible/roles/prometheus/templates/prometheus-alertmanager.yml.j2 b/ansible/roles/prometheus/templates/prometheus-alertmanager.yml.j2 index 19d974e5d7..6968791d24 100644 --- a/ansible/roles/prometheus/templates/prometheus-alertmanager.yml.j2 +++ b/ansible/roles/prometheus/templates/prometheus-alertmanager.yml.j2 @@ -6,17 +6,7 @@ route: group_wait: 10s group_interval: 5m repeat_interval: 3h -{% if enable_prometheus_msteams | bool %} - routes: - - receiver: 'prometheus-msteams' -{% endif %} receivers: - name: default-receiver -{% if enable_prometheus_msteams | bool %} - - name: 'prometheus-msteams' - webhook_configs: - - send_resolved: true - url: 'http://localhost:{{ prometheus_msteams_port }}/alertmanager' -{% endif %} templates: - '/etc/prometheus/*.tmpl' diff --git a/ansible/roles/prometheus/templates/prometheus-msteams.json.j2 b/ansible/roles/prometheus/templates/prometheus-msteams.json.j2 deleted file mode 100644 index 758be92a72..0000000000 --- a/ansible/roles/prometheus/templates/prometheus-msteams.json.j2 +++ /dev/null @@ -1,24 +0,0 @@ -{ - "command": "/opt/prometheus-msteams -http-addr localhost:{{ prometheus_msteams_port }} -config-file /etc/msteams/msteams.yml -template-file /etc/msteams/msteams.tmpl", - "config_files": [ - { - "source": "{{ container_config_directory }}/msteams.yml", - "dest": "/etc/msteams/msteams.yml", - "owner": "prometheus", - "perm": "0600" - }, - { - "source": "{{ container_config_directory }}/msteams.tmpl", - "dest": "/etc/msteams/msteams.tmpl", - "owner": "prometheus", - "perm": "0600" - } - ], - "permissions": [ - { - "path": "/var/log/kolla/prometheus", - "owner": "prometheus:kolla", - "recurse": true - } - ] -} diff --git a/ansible/roles/prometheus/templates/prometheus-msteams.yml.j2 b/ansible/roles/prometheus/templates/prometheus-msteams.yml.j2 deleted file mode 100644 index 49ad1d12dc..0000000000 --- a/ansible/roles/prometheus/templates/prometheus-msteams.yml.j2 +++ /dev/null @@ -1,2 +0,0 @@ -connectors: - - alertmanager: "{{ prometheus_msteams_webhook_url }}" diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 5788fac680..bb7b16c285 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -760,7 +760,6 @@ workaround_ansible_issue_8743: yes #enable_prometheus_blackbox_exporter: "{{ enable_prometheus | bool }}" #enable_prometheus_libvirt_exporter: "{{ enable_prometheus | bool and enable_nova | bool and nova_compute_virt_type in ['kvm', 'qemu'] }}" #enable_prometheus_etcd_integration: "{{ enable_prometheus | bool and enable_etcd | bool }}" -#enable_prometheus_msteams: "no" # The labels to add to any time series or alerts when communicating with external systems (federation, remote storage, Alertmanager). # prometheus_external_labels: diff --git a/releasenotes/notes/drop-prometheus-msteams-9f8a90f4f03745c6.yaml b/releasenotes/notes/drop-prometheus-msteams-9f8a90f4f03745c6.yaml new file mode 100644 index 0000000000..370eacd7a8 --- /dev/null +++ b/releasenotes/notes/drop-prometheus-msteams-9f8a90f4f03745c6.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + Support for deploying ``prometheus-msteams`` has been dropped as the + project is no longer maintained. Users should migrate to the `native + Prometheus Alertmanager integration with Microsoft Teams + `__. diff --git a/tests/templates/inventory.j2 b/tests/templates/inventory.j2 index 92defd391a..e2beb53427 100644 --- a/tests/templates/inventory.j2 +++ b/tests/templates/inventory.j2 @@ -625,9 +625,6 @@ monitoring [prometheus-libvirt-exporter:children] compute -[prometheus-msteams:children] -prometheus-alertmanager - # NOTE(yoctozepto): In CI we want to test Masakari HA but not of other services, # to conserve the resources. Hence, we set Masakari groups to use both # primary and secondary while the parent group (control) uses only primary.