Compare commits
No commits in common. "26a4760a13e0756d0702883f61377e3d539edcda" and "01f4a45153b971ed00c22d36e9e54d38616ec255" have entirely different histories.
26a4760a13
...
01f4a45153
|
@ -62,11 +62,11 @@ setup.kibana:
|
||||||
{% if 'output' not in logs[log_type] or logs[log_type]['output'] == 'elastic' %}
|
{% if 'output' not in logs[log_type] or logs[log_type]['output'] == 'elastic' %}
|
||||||
output.elasticsearch:
|
output.elasticsearch:
|
||||||
hosts: {{ logs[log_type]['es_hosts'] }}
|
hosts: {{ logs[log_type]['es_hosts'] }}
|
||||||
#[#1002040] 如果sublog字段配置为none则忽略索引名称中的sublog字段
|
{% if 'sublog' in logs[log_type] and logs[log_type]['sublog'] -%}
|
||||||
{% if 'sublog' in logs[log_type] and logs[log_type]['sublog'] == 'none' -%}
|
|
||||||
index: "{{ logs[log_type]['index_prefix'] }}-{{ instance_name }}-%{+yyyy.MM.dd}"
|
|
||||||
{% elif 'sublog' in logs[log_type] and logs[log_type]['sublog'] -%}
|
|
||||||
index: "{{ logs[log_type]['index_prefix'] }}-{{ instance_name }}-{{ logs[log_type]['sublog'] }}-%{+yyyy.MM.dd}"
|
index: "{{ logs[log_type]['index_prefix'] }}-{{ instance_name }}-{{ logs[log_type]['sublog'] }}-%{+yyyy.MM.dd}"
|
||||||
|
#[#1002040] 如果sublog字段配置为none则忽略索引名称中的sublog字段
|
||||||
|
{% elif 'sublog' in logs[log_type] and logs[log_type]['sublog'] == 'none' -%}
|
||||||
|
index: "{{ logs[log_type]['index_prefix'] }}-{{ instance_name }}-%{+yyyy.MM.dd}"
|
||||||
{% else -%}
|
{% else -%}
|
||||||
index: "{{ logs[log_type]['index_prefix'] }}-{{ instance_name }}-%{[sublog]}-%{+yyyy.MM.dd}"
|
index: "{{ logs[log_type]['index_prefix'] }}-{{ instance_name }}-%{[sublog]}-%{+yyyy.MM.dd}"
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
Loading…
Reference in New Issue