Add default_metric label
This metric will be used to expose metrics gathered from logs
Introduce system/init.yml which will store system wide params
Change-Id: Ieb3ef83ace82f6f3f1b6a6772b309bc89442705f
diff --git a/fluentd/label/default_metric/init.yml b/fluentd/label/default_metric/init.yml
new file mode 100644
index 0000000..ef8ecf2
--- /dev/null
+++ b/fluentd/label/default_metric/init.yml
@@ -0,0 +1,20 @@
+parameters:
+ fluentd:
+ agent:
+ config:
+ label:
+ default_metric:
+ filter:
+ add_general_fields:
+ tag: "**"
+ type: record_transformer
+ enable_ruby: true
+ record:
+ - name: environment_label
+ value: ${_param:cluster_domain}
+ - name: Hostname
+ value: ${fluentd:dollar}{ hostname }
+ match:
+ drop_everything:
+ tag: '**'
+ type: 'null'
diff --git a/fluentd/label/default_metric/prometheus.yml b/fluentd/label/default_metric/prometheus.yml
new file mode 100644
index 0000000..9eb3b1b
--- /dev/null
+++ b/fluentd/label/default_metric/prometheus.yml
@@ -0,0 +1,11 @@
+parameters:
+ fluentd:
+ agent:
+ plugin:
+ fluent-plugin-prometheus:
+ gem: ['fluent-plugin-prometheus']
+ config:
+ input:
+ prometheus:
+ metric:
+ type: prometheus