mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 14:11:14 +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
|
kind: ConfigMap
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: fluentd-es-config-v0.1.7
|
name: fluentd-es-config-v0.2.0
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
addonmanager.kubernetes.io/mode: Reconcile
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
@@ -143,6 +143,39 @@ data:
|
|||||||
max_lines 1000
|
max_lines 1000
|
||||||
</match>
|
</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: |-
|
system.input.conf: |-
|
||||||
# Example:
|
# Example:
|
||||||
# 2015-12-21 23:17:22,066 [salt.state ][INFO ] Completed state [net.ipv4.ip_forward] at time 23:17:22.066081
|
# 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: |-
|
forward.input.conf: |-
|
||||||
# Takes the messages sent over TCP
|
# Takes the messages sent over TCP
|
||||||
<source>
|
<source>
|
||||||
|
@id forward
|
||||||
@type forward
|
@type forward
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
@@ -383,15 +417,18 @@ data:
|
|||||||
# Prometheus Exporter Plugin
|
# Prometheus Exporter Plugin
|
||||||
# input plugin that exports metrics
|
# input plugin that exports metrics
|
||||||
<source>
|
<source>
|
||||||
|
@id prometheus
|
||||||
@type prometheus
|
@type prometheus
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
<source>
|
<source>
|
||||||
|
@id monitor_agent
|
||||||
@type monitor_agent
|
@type monitor_agent
|
||||||
</source>
|
</source>
|
||||||
|
|
||||||
# input plugin that collects metrics from MonitorAgent
|
# input plugin that collects metrics from MonitorAgent
|
||||||
<source>
|
<source>
|
||||||
|
@id prometheus_monitor
|
||||||
@type prometheus_monitor
|
@type prometheus_monitor
|
||||||
<labels>
|
<labels>
|
||||||
host ${hostname}
|
host ${hostname}
|
||||||
@@ -400,6 +437,7 @@ data:
|
|||||||
|
|
||||||
# input plugin that collects metrics for output plugin
|
# input plugin that collects metrics for output plugin
|
||||||
<source>
|
<source>
|
||||||
|
@id prometheus_output_monitor
|
||||||
@type prometheus_output_monitor
|
@type prometheus_output_monitor
|
||||||
<labels>
|
<labels>
|
||||||
host ${hostname}
|
host ${hostname}
|
||||||
@@ -408,6 +446,7 @@ data:
|
|||||||
|
|
||||||
# input plugin that collects metrics for in_tail plugin
|
# input plugin that collects metrics for in_tail plugin
|
||||||
<source>
|
<source>
|
||||||
|
@id prometheus_tail_monitor
|
||||||
@type prometheus_tail_monitor
|
@type prometheus_tail_monitor
|
||||||
<labels>
|
<labels>
|
||||||
host ${hostname}
|
host ${hostname}
|
||||||
@@ -415,24 +454,6 @@ data:
|
|||||||
</source>
|
</source>
|
||||||
|
|
||||||
output.conf: |-
|
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 **>
|
<match **>
|
||||||
@id elasticsearch
|
@id elasticsearch
|
||||||
@type elasticsearch
|
@type elasticsearch
|
||||||
|
@@ -107,4 +107,4 @@ spec:
|
|||||||
path: /var/lib/docker/containers
|
path: /var/lib/docker/containers
|
||||||
- name: config-volume
|
- name: config-volume
|
||||||
configMap:
|
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 \
|
&& echo 'gem: --no-document' >> /etc/gemrc \
|
||||||
&& gem install --file Gemfile \
|
&& gem install --file Gemfile \
|
||||||
&& mkdir -p /etc/fluent/plugin \
|
&& 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 \
|
&& apt-get purge -y --auto-remove \
|
||||||
-o APT::AutoRemove::RecommendsImportant=false \
|
-o APT::AutoRemove::RecommendsImportant=false \
|
||||||
$BUILD_DEPS \
|
$BUILD_DEPS \
|
||||||
|
Reference in New Issue
Block a user