
Historically Monasca Log Transformer has been for log standardisation and processing. For example, logs from different sources may use slightly different error levels such as WARN, 5, or WARNING. Monasca Log Transformer is a place where these could be 'squashed' into a single error level to simplify log searches based on labels such as these. However, in Kolla Ansible, we do this processing in Fluentd so that the simpler Fluentd -> Elastic -> Kibana pipeline also benefits. This helps to avoid spreading out log parsing configuration over many services, with the Fluentd Monasca output plugin being yet another potential place for processing (which should be avoided). It therefore makes sense to remove this service entirely, and squash any existing configuration which can't be moved to Fluentd into the Log Perister service. I.e. by removing this pipeline, we don't loose any functionality, we encourage log processing to take place in Fluentd, or at least outside of Monasca, and we make significant gains in efficiency by removing a topic from Kafka which contains a copy of all logs in transit. Finally, users forwarding logs from outside the control plane, eg. from tenant instances, should be encouraged to process the logs at the point of sending using whichever framework they are forwarding them with. This makes sense, because all Logstash configuration in Monasca is only accessible by control plane admins. A user can't typically do any processing inside Monasca, with or without this change. Change-Id: I65c76d0d1cd488725e4233b7e75a11d03866095c
190 lines
5.8 KiB
YAML
190 lines
5.8 KiB
YAML
---
|
|
- name: Restart monasca-api container
|
|
vars:
|
|
service_name: "monasca-api"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart monasca-log-persister container
|
|
vars:
|
|
service_name: "monasca-log-persister"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart monasca-log-metrics container
|
|
vars:
|
|
service_name: "monasca-log-metrics"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart monasca-thresh container
|
|
vars:
|
|
service_name: "monasca-thresh"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart monasca-notification container
|
|
vars:
|
|
service_name: "monasca-notification"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart monasca-persister container
|
|
vars:
|
|
service_name: "monasca-persister"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart monasca-agent-collector container
|
|
vars:
|
|
service_name: "monasca-agent-collector"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
pid_mode: "{{ service.pid_mode }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart monasca-agent-forwarder container
|
|
vars:
|
|
service_name: "monasca-agent-forwarder"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart monasca-agent-statsd container
|
|
vars:
|
|
service_name: "monasca-agent-statsd"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart first monasca-grafana container
|
|
listen: Restart monasca-grafana container
|
|
vars:
|
|
service_name: "monasca-grafana"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname == groups[service.group]|first
|
|
|
|
- name: Waiting for monasca-grafana to start on first node
|
|
listen: Restart monasca-grafana container
|
|
vars:
|
|
service_name: "monasca-grafana"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_toolbox:
|
|
module_name: uri
|
|
module_args:
|
|
url: "http://{{ api_interface_address | put_address_in_context('url') }}:{{ monasca_grafana_server_port }}/login"
|
|
status_code: 200
|
|
register: result
|
|
until: result.get('status') == 200
|
|
retries: 40
|
|
delay: 2
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname == groups[service.group]|first
|
|
|
|
- name: Restart remaining monasca-grafana containers
|
|
listen: Restart monasca-grafana container
|
|
vars:
|
|
service_name: "monasca-grafana"
|
|
service: "{{ monasca_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
- inventory_hostname != groups[service.group]|first
|