Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.0.0] expose override raw conf for container log pipeline #556

Merged
merged 2 commits into from
Apr 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion deploy/helm/sumologic/conf/logs/logs.source.containers.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{{ if .Values.fluentd.logs.containers.overrideRawConfig }}
{{ .Values.fluentd.logs.containers.overrideRawConfig }}
{{- else}}
<filter containers.**>
@type record_transformer
enable_ruby
Expand All @@ -14,7 +17,8 @@
@label @NORMAL
</match>
<label @NORMAL>
# only match fluentd logs based on fluentd container name
# only match fluentd logs based on fluentd container name. by default, this is
# <filter **collection-sumologic**>
{{ printf "<filter **%s**>" (include "sumologic.fullname" .) }}
# only ingest fluentd logs of levels: {error, fatal} and warning messages if buffer is full
@type grep
Expand Down Expand Up @@ -54,3 +58,4 @@
</buffer>
</match>
</label>
{{- end}}
6 changes: 5 additions & 1 deletion deploy/helm/sumologic/conf/logs/logs.source.systemd.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.fluentd.logs.kubelet.enabled }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

<match host.kubelet.**>
@type relabel
@label @KUBELET
Expand Down Expand Up @@ -29,6 +30,8 @@
</buffer>
</match>
</label>
{{- end}}
{{ if .Values.fluentd.logs.systemd.enabled }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

<match host.**>
@type relabel
@label @SYSTEMD
Expand Down Expand Up @@ -64,4 +67,5 @@
@include buffer.output.conf
</buffer>
</match>
</label>
</label>
{{- end}}
5 changes: 5 additions & 0 deletions deploy/helm/sumologic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ fluentd:

## Container log configuration
containers:
## To override the contents of logs.source.containers.conf file. Leave empty for the default pipeline
overrideRawConfig: |-

outputConf: |-
@include logs.output.conf
## Set the _sourceName metadata field in Sumo Logic.
Expand Down Expand Up @@ -257,6 +260,7 @@ fluentd:

## Kubelet log configuration
kubelet:
enabled: true
outputConf: |-
@include logs.output.conf
## Set the _sourceName metadata field in Sumo Logic.
Expand All @@ -283,6 +287,7 @@ fluentd:

## Systemd log configuration
systemd:
enabled: true
outputConf: |-
@include logs.output.conf
## Set the _sourceCategory metadata field in Sumo Logic.
Expand Down
6 changes: 5 additions & 1 deletion deploy/kubernetes/fluentd-sumologic.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ data:
proxy_uri ""

logs.source.containers.conf: |

<filter containers.**>
@type record_transformer
enable_ruby
Expand All @@ -246,7 +247,8 @@ data:
@label @NORMAL
</match>
<label @NORMAL>
# only match fluentd logs based on fluentd container name
# only match fluentd logs based on fluentd container name. by default, this is
# <filter **collection-sumologic**>
<filter **collection-sumologic**>
sumo-drosiek marked this conversation as resolved.
Show resolved Hide resolved
# only ingest fluentd logs of levels: {error, fatal} and warning messages if buffer is full
@type grep
Expand Down Expand Up @@ -292,6 +294,7 @@ data:
</buffer>
</match>
logs.source.systemd.conf: |-

<match host.kubelet.**>
@type relabel
@label @KUBELET
Expand All @@ -318,6 +321,7 @@ data:
</buffer>
</match>
</label>

<match host.**>
@type relabel
@label @SYSTEMD
Expand Down