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

Change the way to configure "concat" filter for container logs #117

Merged
merged 1 commit into from
Apr 29, 2021
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [0.24.11] - 2021-04-29

- Change the way to configure "concat" filter for container logs (#117)

## [0.24.10] - 2021-04-21

### Changed
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/splunk-otel-collector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: splunk-otel-collector
version: 0.24.10
version: 0.24.11
description: Splunk OpenTelemetry Connector for Kubernetes
icon: https://github.com/signalfx/splunk-otel-collector-chart/tree/main/splunk.png
type: application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ data:
# = filters for container logs =
{{- range $name, $logDef := .Values.fluentd.config.logs }}
{{- if and $logDef.from.pod $logDef.multiline }}
<filter tail.containers.var.log.containers.{{ $logDef.from.pod }}*{{ or $logDef.from.container $name }}*.log>
{{- $filenameGlob := regexReplaceAll "\\*+" (printf "%s*%s*" $logDef.from.pod ($logDef.from.container | default "")) "*" }}
<filter tail.containers.var.log.containers.{{ $filenameGlob }}.log>
@type concat
key log
timeout_label @SPLUNK
Expand Down
5 changes: 4 additions & 1 deletion helm-charts/splunk-otel-collector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,10 @@ fluentd:
# path: /var/log/docker.log
# ```
#
# For `container` logs, pod name is required. You can also provide the container name, if it's not provided, the name of this source will be used as the container name:
# For `container` logs, `pod` field is required. It represents part of
# the pod name, can be name of a deployment or replica set. Use "*" to
# apply the configuration to all pods. Optional `container` value can be
# used to apply configuration to a particular container.
# ```
# kube-apiserver:
# from:
Expand Down