Add support for ceilometer custom pipeline.yaml
This file can be modified to adjust polling intervals or other configurations. We can add a custom 'pipeline.yaml' file to override it. Change-Id: I325523edc4f7e37db55a2e21fe52e76138e6d114 Signed-off-by: ZijianGuo <guozijn@gmail.com>
This commit is contained in:
parent
1c866201e3
commit
c89b901524
@ -7,6 +7,7 @@
|
||||
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
gnocchi_resources_overwriting: "{{ ceilometer_gnocchi_resources_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
pipeline_overwriting: "{{ ceilometer_pipeline_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
polling_overwriting: "{{ ceilometer_polling_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
ceilometer_notification_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
@ -26,6 +27,7 @@
|
||||
- config_json.changed | bool
|
||||
or ceilometer_conf.changed | bool
|
||||
or gnocchi_resources_overwriting.changed | bool
|
||||
or pipeline_overwriting.changed | bool
|
||||
or policy_overwriting.changed | bool
|
||||
or polling_overwriting.changed | bool
|
||||
or ceilometer_events.changed | bool
|
||||
@ -41,6 +43,7 @@
|
||||
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
gnocchi_resources_overwriting: "{{ ceilometer_gnocchi_resources_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
pipeline_overwriting: "{{ ceilometer_pipeline_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
polling_overwriting: "{{ ceilometer_polling_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
ceilometer_central_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
@ -60,6 +63,7 @@
|
||||
or ceilometer_conf.changed | bool
|
||||
or ceilometer_pipeline.changed | bool
|
||||
or gnocchi_resources_overwriting.changed | bool
|
||||
or pipeline_overwriting.changed | bool
|
||||
or policy_overwriting.changed | bool
|
||||
or polling_overwriting.changed | bool
|
||||
or ceilometer_central_container.changed | bool
|
||||
@ -72,6 +76,7 @@
|
||||
ceilometer_conf: "{{ ceilometer_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
ceilometer_pipeline: "{{ ceilometer_pipelines.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
gnocchi_resources_overwriting: "{{ ceilometer_gnocchi_resources_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
pipeline_overwriting: "{{ ceilometer_pipeline_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
policy_overwriting: "{{ ceilometer_policy_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
polling_overwriting: "{{ ceilometer_polling_overwriting.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
ceilometer_compute_container: "{{ check_ceilometer_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
||||
@ -92,6 +97,7 @@
|
||||
or ceilometer_conf.changed | bool
|
||||
or ceilometer_pipeline.changed | bool
|
||||
or gnocchi_resources_overwriting.changed | bool
|
||||
or pipeline_overwriting.changed | bool
|
||||
or policy_overwriting.changed | bool
|
||||
or polling_overwriting.changed | bool
|
||||
or vcenter_ca_file.changed | bool
|
||||
|
@ -140,6 +140,32 @@
|
||||
notify:
|
||||
- Restart ceilometer-notification container
|
||||
|
||||
- name: Check custom pipeline.yaml exists
|
||||
local_action: stat path="{{ node_custom_config }}/ceilometer/pipeline.yaml"
|
||||
register: ceilometer_pipeline_file
|
||||
|
||||
- name: Copying over pipeline.yaml
|
||||
vars:
|
||||
services_require_pipeline:
|
||||
- ceilometer-compute
|
||||
- ceilometer-central
|
||||
- ceilometer-notification
|
||||
copy:
|
||||
src: "{{ node_custom_config }}/ceilometer/pipeline.yaml"
|
||||
dest: "{{ node_config_directory }}/{{ item.key }}/pipeline.yaml"
|
||||
force: True
|
||||
mode: "0660"
|
||||
become: true
|
||||
register: ceilometer_pipeline_overwriting
|
||||
when:
|
||||
- ceilometer_pipeline_file.stat.exists
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
- item.value.enabled | bool
|
||||
- item.key in services_require_pipeline
|
||||
with_dict: "{{ ceilometer_services }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
|
||||
- name: Copying over pipeline.yaml file
|
||||
vars:
|
||||
services_require_pipeline:
|
||||
@ -156,6 +182,7 @@
|
||||
- inventory_hostname in groups[item.value.group]
|
||||
- item.value.enabled | bool
|
||||
- item.key in services_require_pipeline
|
||||
- not ceilometer_pipeline_file.stat.exists
|
||||
with_dict: "{{ ceilometer_services }}"
|
||||
notify:
|
||||
- "Restart {{ item.key }} container"
|
||||
|
Loading…
Reference in New Issue
Block a user