Update fluentd templates
Add new fields to
- filter/parser
- input/rabbitmq
- match/elasticsearch
Change-Id: I59b09793e5b54083f722e6df3668d59032ae3688
PROD-related: PROD-29185
diff --git a/fluentd/files/filter/parser.conf b/fluentd/files/filter/parser.conf
index 33ca7ec..50b2b12 100644
--- a/fluentd/files/filter/parser.conf
+++ b/fluentd/files/filter/parser.conf
@@ -1,7 +1,16 @@
<filter {{ values.tag }}>
@type parser
key_name {{ values.key_name }}
+ reserve_time {{ values.get('reserve_time', false) | lower }}
reserve_data {{ values.get('reserve_data', true) | lower }}
+ remove_key_name_field {{ values.get('remove_key_name_field', false) | lower }}
+ replace_invalid_sequence {{ values.get('replace_invalid_sequence', false) | lower }}
+{%- if values.inject_key_prefix is defined %}
+ inject_key_prefix {{ values.inject_key_prefix }}
+{%- endif %}
+{%- if values.hash_value_field is defined %}
+ hash_value_field {{ values.hash_value_field }}
+{%- endif %}
emit_invalid_record_to_error {{ values.get('emit_invalid_record_to_error', true) | lower }}
<parse>
{%- with values=values.get('parser') %}
diff --git a/fluentd/files/input/rabbitmq.conf b/fluentd/files/input/rabbitmq.conf
index bb6c1da..07eceac 100644
--- a/fluentd/files/input/rabbitmq.conf
+++ b/fluentd/files/input/rabbitmq.conf
@@ -1,21 +1,33 @@
<source>
{% include 'fluentd/files/input/_general.conf' %}
- tag {{ values.tag }}
+{%- if values.get('host') %}
host {{ values.host }}
+{%- endif %}
+{%- if values.get('hosts') %}
+ hosts {{ values.hosts | json }}
+{%- endif %}
+{%- if values.get('port') %}
+ port {{ values.port }}
+{%- endif %}
user {{ values.user }}
+{%- if values.get('pass') %}
+ pass {{ values.pass }}
+{%- endif %}
vhost {{ values.vhost }}
- exchange {{ values.exchange }}
queue {{ values.queue }}
routing_key {{ values.routing_key }}
- heartbeat {{ values.get("heartbeat", 10) }}
-{%- if values.get(durable) %}
- durable {{ values.get(durable) | lower }}
+ heartbeat {{ values.get('heartbeat', 10) }}
+{%- if values.get('exchange') %}
+ exchange {{ values.exchange }}
{%- endif %}
-{%- if values.get(exclusive) %}
- exclusive {{ values.get(exclusive) | lower }}
+{%- if values.get('durable') %}
+ durable {{ values.get('durable') | lower }}
{%- endif %}
-{%- if values.get(auto_delete) %}
- auto_delete {{ values.get(auto_delete) | lower }}
+{%- if values.get('exclusive') %}
+ exclusive {{ values.get('exclusive') | lower }}
+{%- endif %}
+{%- if values.get('auto_delete') %}
+ auto_delete {{ values.get('auto_delete') | lower }}
{%- endif %}
{%- if values.get('parser') %}
<parse>
diff --git a/fluentd/files/match/elasticsearch.conf b/fluentd/files/match/elasticsearch.conf
index f69d998..f966b22 100644
--- a/fluentd/files/match/elasticsearch.conf
+++ b/fluentd/files/match/elasticsearch.conf
@@ -2,7 +2,7 @@
host {{ values.host }}
port {{ values.get("port", 9200) }}
type_name {{ values.get("es_type_name", "message") }}
- tag_key Logger
+ tag_key {{ values.get("tag_key", "Logger") }}
include_tag_key true
time_key Timestamp
time_key_exclude_timestamp true