mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	removed fabric8 json plugin & replaced with fluetnds build in filter_parser
Signed-off-by: André Bauer <monotek23@gmail.com>
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
			
		||||
kind: ConfigMap
 | 
			
		||||
apiVersion: v1
 | 
			
		||||
metadata:
 | 
			
		||||
  name: fluentd-es-config-v0.1.7
 | 
			
		||||
  name: fluentd-es-config-v0.2.0
 | 
			
		||||
  namespace: kube-system
 | 
			
		||||
  labels:
 | 
			
		||||
    addonmanager.kubernetes.io/mode: Reconcile
 | 
			
		||||
@@ -143,6 +143,39 @@ data:
 | 
			
		||||
      max_lines 1000
 | 
			
		||||
    </match>
 | 
			
		||||
 | 
			
		||||
    # Concatenate multi-line logs
 | 
			
		||||
    <filter **>
 | 
			
		||||
      @id filter_concat
 | 
			
		||||
      @type concat
 | 
			
		||||
      key message
 | 
			
		||||
      multiline_end_regexp /\n$/
 | 
			
		||||
      separator ""
 | 
			
		||||
    </filter>
 | 
			
		||||
 | 
			
		||||
    # Enriches records with Kubernetes metadata
 | 
			
		||||
    <filter kubernetes.**>
 | 
			
		||||
      @id filter_kubernetes_metadata
 | 
			
		||||
      @type kubernetes_metadata
 | 
			
		||||
    </filter>
 | 
			
		||||
 | 
			
		||||
    # Fixes json fields in Elasticsearch
 | 
			
		||||
    <filter kubernetes.**>
 | 
			
		||||
      @id filter_parser
 | 
			
		||||
      @type parser
 | 
			
		||||
      key_name log
 | 
			
		||||
      reserve_data true
 | 
			
		||||
      remove_key_name_field true
 | 
			
		||||
      <parse>
 | 
			
		||||
        @type multi_format
 | 
			
		||||
        <pattern>
 | 
			
		||||
          format json
 | 
			
		||||
        </pattern>
 | 
			
		||||
        <pattern>
 | 
			
		||||
          format none
 | 
			
		||||
        </pattern>
 | 
			
		||||
      </parse>
 | 
			
		||||
    </filter>
 | 
			
		||||
 | 
			
		||||
  system.input.conf: |-
 | 
			
		||||
    # Example:
 | 
			
		||||
    # 2015-12-21 23:17:22,066 [salt.state       ][INFO    ] Completed state [net.ipv4.ip_forward] at time 23:17:22.066081
 | 
			
		||||
@@ -376,6 +409,7 @@ data:
 | 
			
		||||
  forward.input.conf: |-
 | 
			
		||||
    # Takes the messages sent over TCP
 | 
			
		||||
    <source>
 | 
			
		||||
      @id forward
 | 
			
		||||
      @type forward
 | 
			
		||||
    </source>
 | 
			
		||||
 | 
			
		||||
@@ -383,15 +417,18 @@ data:
 | 
			
		||||
    # Prometheus Exporter Plugin
 | 
			
		||||
    # input plugin that exports metrics
 | 
			
		||||
    <source>
 | 
			
		||||
      @id prometheus
 | 
			
		||||
      @type prometheus
 | 
			
		||||
    </source>
 | 
			
		||||
 | 
			
		||||
    <source>
 | 
			
		||||
      @id monitor_agent
 | 
			
		||||
      @type monitor_agent
 | 
			
		||||
    </source>
 | 
			
		||||
 | 
			
		||||
    # input plugin that collects metrics from MonitorAgent
 | 
			
		||||
    <source>
 | 
			
		||||
      @id prometheus_monitor
 | 
			
		||||
      @type prometheus_monitor
 | 
			
		||||
      <labels>
 | 
			
		||||
        host ${hostname}
 | 
			
		||||
@@ -400,6 +437,7 @@ data:
 | 
			
		||||
 | 
			
		||||
    # input plugin that collects metrics for output plugin
 | 
			
		||||
    <source>
 | 
			
		||||
      @id prometheus_output_monitor
 | 
			
		||||
      @type prometheus_output_monitor
 | 
			
		||||
      <labels>
 | 
			
		||||
        host ${hostname}
 | 
			
		||||
@@ -408,6 +446,7 @@ data:
 | 
			
		||||
 | 
			
		||||
    # input plugin that collects metrics for in_tail plugin
 | 
			
		||||
    <source>
 | 
			
		||||
      @id prometheus_tail_monitor
 | 
			
		||||
      @type prometheus_tail_monitor
 | 
			
		||||
      <labels>
 | 
			
		||||
        host ${hostname}
 | 
			
		||||
@@ -415,24 +454,6 @@ data:
 | 
			
		||||
    </source>
 | 
			
		||||
 | 
			
		||||
  output.conf: |-
 | 
			
		||||
    # Enriches records with Kubernetes metadata
 | 
			
		||||
    <filter kubernetes.**>
 | 
			
		||||
      @type kubernetes_metadata
 | 
			
		||||
    </filter>
 | 
			
		||||
 | 
			
		||||
    # Adds the json parsing which was removed in kubernetes_metadata filter > 2.1.x
 | 
			
		||||
    <filter kubernetes.**>
 | 
			
		||||
      @type parse_json_field
 | 
			
		||||
    </filter>
 | 
			
		||||
 | 
			
		||||
    # Concatenate multi-line logs
 | 
			
		||||
    <filter **>
 | 
			
		||||
      @type concat
 | 
			
		||||
      key message
 | 
			
		||||
      multiline_end_regexp /\n$/
 | 
			
		||||
      separator ""
 | 
			
		||||
    </filter>
 | 
			
		||||
 | 
			
		||||
    <match **>
 | 
			
		||||
      @id elasticsearch
 | 
			
		||||
      @type elasticsearch
 | 
			
		||||
 
 | 
			
		||||
@@ -107,4 +107,4 @@ spec:
 | 
			
		||||
          path: /var/lib/docker/containers
 | 
			
		||||
      - name: config-volume
 | 
			
		||||
        configMap:
 | 
			
		||||
          name: fluentd-es-config-v0.1.7
 | 
			
		||||
          name: fluentd-es-config-v0.2.0
 | 
			
		||||
 
 | 
			
		||||
@@ -39,7 +39,6 @@ RUN BUILD_DEPS="make gcc g++ libc6-dev ruby-dev libffi-dev curl" \
 | 
			
		||||
    && echo 'gem: --no-document' >> /etc/gemrc \
 | 
			
		||||
    && gem install --file Gemfile \
 | 
			
		||||
    && mkdir -p /etc/fluent/plugin \
 | 
			
		||||
    && curl -s https://raw.githubusercontent.com/openshift/origin-aggregated-logging/master/fluentd/lib/filter_parse_json_field/lib/filter_parse_json_field.rb -o /etc/fluent/plugin/filter_parse_json_field.rb \
 | 
			
		||||
    && apt-get purge -y --auto-remove \
 | 
			
		||||
                     -o APT::AutoRemove::RecommendsImportant=false \
 | 
			
		||||
                     $BUILD_DEPS \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user