Merge "Disable elasticsearch output when enable_elasticsearch is no in fluentd"
This commit is contained in:
commit
a0d2962f48
@ -35,11 +35,15 @@
|
||||
|
||||
- name: Copying over fluentd ouput config files
|
||||
template:
|
||||
src: "conf/output/{{ item }}.conf.j2"
|
||||
dest: "{{ node_config_directory }}/fluentd/output/{{ item }}.conf"
|
||||
src: "conf/output/{{ item.name }}.conf.j2"
|
||||
dest: "{{ node_config_directory }}/fluentd/output/{{ item.name }}.conf"
|
||||
when: item.enabled | bool
|
||||
with_items:
|
||||
- "00-local"
|
||||
- "01-es"
|
||||
- name: "00-local"
|
||||
enabled: true
|
||||
- name: "01-es"
|
||||
enabled: "{{ enable_elasticsearch }}"
|
||||
|
||||
- name: Copying over fluentd format config files
|
||||
template:
|
||||
src: "conf/format/{{ item }}.conf.j2"
|
||||
@ -48,7 +52,7 @@
|
||||
- "apache_access"
|
||||
- "wsgi_access"
|
||||
- "wsgi_python"
|
||||
|
||||
|
||||
- name: Copying over fluentd filter config files
|
||||
template:
|
||||
src: "conf/filter/{{ item }}.conf.j2"
|
||||
|
@ -8,6 +8,7 @@
|
||||
append true
|
||||
compress gzip
|
||||
</store>
|
||||
{% if enable_elasticsearch | bool %}
|
||||
<store>
|
||||
type elasticsearch
|
||||
host {{ kolla_external_vip_address }}
|
||||
@ -16,6 +17,7 @@
|
||||
logstash_prefix flog
|
||||
flush_interval 15s
|
||||
</store>
|
||||
{% endif %}
|
||||
</match>
|
||||
|
||||
<match syslog.local1.**>
|
||||
@ -30,6 +32,7 @@
|
||||
append true
|
||||
compress gzip
|
||||
</store>
|
||||
{% if enable_elasticsearch | bool %}
|
||||
<store>
|
||||
type elasticsearch
|
||||
host {{ kolla_external_vip_address }}
|
||||
@ -38,4 +41,5 @@
|
||||
logstash_prefix flog
|
||||
flush_interval 15s
|
||||
</store>
|
||||
{% endif %}
|
||||
</match>
|
||||
|
@ -60,13 +60,13 @@
|
||||
"dest": "/etc/td-agent/format/wsgi_python.conf",
|
||||
"owner": "td-agent",
|
||||
"perm": "0600"
|
||||
},
|
||||
},{% if enable_elasticsearch | bool %}
|
||||
{
|
||||
"source": "{{ container_config_directory }}/output/01-es.conf",
|
||||
"dest": "/etc/td-agent/output/01-es.conf",
|
||||
"owner": "td-agent",
|
||||
"perm": "0600"
|
||||
},
|
||||
},{% endif %}
|
||||
{
|
||||
"source": "{{ container_config_directory }}/output/00-local.conf",
|
||||
"dest": "/etc/td-agent/output/00-local.conf",
|
||||
|
Loading…
Reference in New Issue
Block a user