Add templates for splunk output
Change-Id: Id3b436325a75e2e5d457bff1d5561e5413a88f28
PROD-related: PROD-30497
diff --git a/fluentd/files/match/splunk_hec.conf b/fluentd/files/match/splunk_hec.conf
new file mode 100644
index 0000000..99e29b9
--- /dev/null
+++ b/fluentd/files/match/splunk_hec.conf
@@ -0,0 +1,90 @@
+ @type splunk_hec
+ host {{ values.host }}
+ port {{ values.port }}
+ token {{ values.token }}
+
+ # Metadata parameters
+{%- if values.default_host is defined %}
+ default_host {{ values.default_host }}
+{%- endif %}
+{%- if values.host_key is defined %}
+ host_key {{ values.host_key }}
+{%- endif %}
+{%- if values.remove_host_key is defined %}
+ remove_host_key {{ values.remove_host_key | lower }}
+{%- endif %}
+
+{%- if values.default_source is defined %}
+ default_source {{ values.default_source }}
+{%- endif %}
+{%- if values.source_key is defined %}
+ source_key {{ values.source_key }}
+{%- endif %}
+{%- if values.remove_source_key is defined %}
+ remove_source_key {{ values.remove_source_key | lower }}
+{%- endif %}
+
+{%- if values.default_index is defined %}
+ default_index {{ values.default_index }}
+{%- endif %}
+{%- if values.index_key is defined %}
+ index_key {{ values.index_key }}
+{%- endif %}
+{%- if values.remove_index_key is defined %}
+ remove_index_key {{ values.remove_index_key | lower }}
+{%- endif %}
+
+{%- if values.sourcetype is defined %}
+ sourcetype {{ values.sourcetype }}
+{%- endif %}
+{%- if values.use_fluentd_time is defined %}
+ use_fluentd_time {{ values.use_fluentd_time | lower }}
+{%- endif %}
+
+ # Indexer acknowledgement parameters
+{%- if values.use_ack is defined %}
+ use_ack {{ values.use_ack | lower }}
+{%- endif %}
+{%- if values.channel is defined %}
+ channel {{ values.channel }}
+{%- endif %}
+{%- if values.ack_interval is defined %}
+ ack_interval {{ values.ack_interval }}
+{%- endif %}
+{%- if values.ack_retry_limit is defined %}
+ ack_retry_limit {{ values.ack_retry_limit }}
+{%- endif %}
+
+ # Raw events parameters
+{%- if values.raw is defined %}
+ raw {{ values.raw | lower }}
+{%- endif %}
+{%- if values.event_key is defined %}
+ event_key {{ values.event_key }}
+{%- endif %}
+
+ # Misc parameters
+{%- if values.line_breaker is defined %}
+ line_breaker {{ values.line_breaker }}
+{%- endif %}
+
+ # SSL parameter
+{%- if values.use_ssl is defined %}
+ use_ssl {{ values.use_ssl | lower }}
+{%- endif %}
+{%- if values.ssl_verify is defined %}
+ ssl_verify {{ values.ssl_verify | lower }}
+{%- endif %}
+{%- if values.ca_file is defined %}
+ ca_file {{ values.ca_file }}
+{%- endif %}
+{%- if values.client_cert is defined %}
+ client_cert {{ values.client_cert }}
+{%- endif %}
+{%- if values.client_key is defined %}
+ client_key {{ values.client_key }}
+{%- endif %}
+{%- if values.client_key_pass is defined %}
+ client_key_pass {{ values.client_key_pass }}
+{%- endif %}
+
diff --git a/fluentd/files/match/splunk_tcp.conf b/fluentd/files/match/splunk_tcp.conf
new file mode 100644
index 0000000..4d4ebf7
--- /dev/null
+++ b/fluentd/files/match/splunk_tcp.conf
@@ -0,0 +1,51 @@
+ @type splunk_tcp
+ host {{ values.host }}
+ port {{ values.port }}
+
+{%- if values.format is defined %}
+ format {{ values.format }}
+{%- endif %}
+
+ # Raw format parameters
+{%- if values.event_key is defined %}
+ event_key {{ values.event_key }}
+{%- endif %}
+
+ # Json, kv format parameters
+{%- if values.use_fluentd_time is defined %}
+ use_fluentd_time {{ values.use_fluentd_time | lower }}
+{%- endif %}
+{%- if values.time_key is defined %}
+ time_key {{ values.time_key }}
+{%- endif %}
+{%- if values.time_format is defined %}
+ time_format {{ values.time_format }}
+{%- endif %}
+{%- if values.localtime is defined %}
+ localtime {{ values.localtime | lower }}
+{%- endif %}
+
+ # Misc parameters
+{%- if values.line_breaker is defined %}
+ line_breaker {{ values.line_breaker }}
+{%- endif %}
+
+ # SSL parameters
+{%- if values.use_ssl is defined %}
+ use_ssl {{ values.use_ssl | lower }}
+{%- endif %}
+{%- if values.ssl_verify is defined %}
+ ssl_verify {{ values.ssl_verify | lower }}
+{%- endif %}
+{%- if values.ca_file is defined %}
+ ca_file {{ values.ca_file }}
+{%- endif %}
+{%- if values.client_cert is defined %}
+ client_cert {{ values.client_cert }}
+{%- endif %}
+{%- if values.client_key is defined %}
+ client_key {{ values.client_key }}
+{%- endif %}
+{%- if values.client_key_pass is defined %}
+ client_key_pass {{ values.client_key_pass }}
+{%- endif %}