Add fields to parsers/filters
Add emit_invalid_record_to_error field to parser filter
Add types field to regex parser
Add optional field key to prometheus filter
Change-Id: Idae438dc22448217f52348e783b7fb7f5c2a92ed
diff --git a/fluentd/files/filter/parser.conf b/fluentd/files/filter/parser.conf
index 0579e32..33ca7ec 100644
--- a/fluentd/files/filter/parser.conf
+++ b/fluentd/files/filter/parser.conf
@@ -2,6 +2,7 @@
@type parser
key_name {{ values.key_name }}
reserve_data {{ values.get('reserve_data', true) | lower }}
+ emit_invalid_record_to_error {{ values.get('emit_invalid_record_to_error', true) | lower }}
<parse>
{%- with values=values.get('parser') %}
@type {{ values.get('type') }}
diff --git a/fluentd/files/filter/prometheus.conf b/fluentd/files/filter/prometheus.conf
index 7f8388f..5ac4090 100644
--- a/fluentd/files/filter/prometheus.conf
+++ b/fluentd/files/filter/prometheus.conf
@@ -12,6 +12,9 @@
name {{ metric.name }}
type {{ metric.type }}
desc {{ metric.desc }}
+ {%- if metric.get('key') %}
+ key {{ metric.key }}
+ {%- endif %}
</metric>
{%- endfor %}
</filter>
diff --git a/fluentd/files/parser/regexp.conf b/fluentd/files/parser/regexp.conf
index 7df0fa6..55795b7 100644
--- a/fluentd/files/parser/regexp.conf
+++ b/fluentd/files/parser/regexp.conf
@@ -4,3 +4,6 @@
time_format {{ values.time_format }}
{%- endif %}
keep_time_key {{ values.get("keep_time_key", False) | json }}
+{%- if values.get('types') %}
+ types {{ values.types }}
+{%- endif %}