Browse Source

Merge pull request #9336 from jcantrill/conf_merge_json

Configure Merge json log
OpenShift Merge Robot 6 years ago
parent
commit
b03aaef024

+ 4 - 0
roles/openshift_logging_fluentd/defaults/main.yml

@@ -28,6 +28,10 @@ openshift_logging_fluentd_app_port: 9200
 openshift_logging_fluentd_ops_host: "{{ openshift_logging_fluentd_app_host }}"
 openshift_logging_fluentd_ops_port: "{{ openshift_logging_fluentd_app_port }}"
 
+# openshift_logging_fluentd_merge_json_log configures fluentd to parse
+# JSON log messages into the top level payload envelope
+openshift_logging_fluentd_merge_json_log: "true"
+
 ### Used by "hosted" and "secure-aggregator" deployments
 openshift_logging_fluentd_journal_source: ""
 openshift_logging_fluentd_journal_read_from_head: ""

+ 2 - 0
roles/openshift_logging_fluentd/templates/fluentd.j2

@@ -99,6 +99,8 @@ spec:
           readOnly: true
 {% endif %}
         env:
+        - name: "MERGE_JSON_LOG"
+          value: "{{ openshift_logging_fluentd_merge_json_log }}"
         - name: "K8S_HOST_URL"
           value: "{{ openshift_logging_fluentd_master_url }}"
         - name: "ES_HOST"