Skip to content

Commit

Permalink
removed fabric8 json plugin & replaced with fluetnds build in filter_…
Browse files Browse the repository at this point in the history
…parser

Signed-off-by: André Bauer <monotek23@gmail.com>
  • Loading branch information
monotek committed Dec 20, 2018
1 parent dd50d00 commit c33b5b6
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 21 deletions.
59 changes: 40 additions & 19 deletions cluster/addons/fluentd-elasticsearch/fluentd-es-configmap.yaml
@@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -376,22 +409,26 @@ data:
forward.input.conf: |-
# Takes the messages sent over TCP
<source>
@id forward
@type forward
</source>
monitoring.conf: |-
# 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}
Expand All @@ -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}
Expand All @@ -408,31 +446,14 @@ data:
# input plugin that collects metrics for in_tail plugin
<source>
@id prometheus_tail_monitor
@type prometheus_tail_monitor
<labels>
host ${hostname}
</labels>
</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
Expand Down
2 changes: 1 addition & 1 deletion cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml
Expand Up @@ -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
Expand Up @@ -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 \
Expand Down

0 comments on commit c33b5b6

Please sign in to comment.