Merge "Add possibility to disable label"
diff --git a/metadata/service/agent/output/elasticsearch.yml b/metadata/service/agent/output/elasticsearch.yml
new file mode 100644
index 0000000..29921d0
--- /dev/null
+++ b/metadata/service/agent/output/elasticsearch.yml
@@ -0,0 +1,28 @@
+classes:
+- service.fluentd.agent.single
+parameters:
+ fluentd:
+ agent:
+ config:
+ label:
+ default_output:
+ filter:
+ add_general_fields:
+ tag: "**"
+ type: record_transformer
+ enable_ruby: true
+ record:
+ - name: Type
+ value: log
+ - name: environment_label
+ value: ${_param:cluster_domain}
+ - name: Hostname
+ value: ${fluentd:dollar}{ hostname }
+ - name: Timestamp
+ value: ${fluentd:dollar}{ time.strftime('%Y-%m-%dT%H:%M:%S.%N%z') }
+ match:
+ elasticsearch_output:
+ tag: "**"
+ type: elasticsearch
+ host: 127.0.0.1
+ port: 9200
diff --git a/metadata/service/agent/single.yml b/metadata/service/agent/single.yml
index 5b6c3d7..b4ea1c1 100644
--- a/metadata/service/agent/single.yml
+++ b/metadata/service/agent/single.yml
@@ -1,6 +1,7 @@
applications:
- fluentd
classes:
+ - service.fluentd
- service.fluentd.support
parameters:
fluentd:
diff --git a/metadata/service/init.yml b/metadata/service/init.yml
new file mode 100644
index 0000000..f714b99
--- /dev/null
+++ b/metadata/service/init.yml
@@ -0,0 +1,3 @@
+parameters:
+ fluentd:
+ dollar: "$"