kolla-ansible/ansible/roles/monasca/tasks/cleanup.yml
Doug Szumski 0743a9bf4b Remove Monasca Log Transformer
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
2021-03-03 17:20:18 +00:00

23 lines
676 B
YAML

---
- name: Stop and remove containers for disabled monasca services
become: true
kolla_docker:
action: "stop_and_remove_container"
name: "{{ item.value.container_name }}"
when:
- inventory_hostname in groups[item.value.group]
- not item.value.enabled | bool
with_dict: "{{ monasca_services }}"
- name: Removing config for any disabled services
file:
path: "{{ node_config_directory }}/{{ item.key }}"
state: "absent"
become: true
when:
- inventory_hostname in groups[item.value.group]
- not item.value.enabled | bool
with_dict: "{{ monasca_services }}"
# NOTE(dszumski): Docker volume removal is currently a manual procedure