Skip to content

Commit d76844a

Browse files
Merge pull request #20 from oracle-quickstart/hostname_fix
rewrite_tag plugin hostname command fix to work with OL8 Image on OCR
2 parents 1da38c7 + 9fd8ddd commit d76844a

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

logan/helm-chart/templates/configmap-logs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ data:
262262
# Match block to filter kubelet logs from syslogs
263263
<match oci.oke.syslog.messages.**>
264264
@type rewrite_tag_filter
265+
hostname_command {{ ((.Values.fluentd).rewriteTagPlugin).hostname_command | default "cat /etc/hostname" }}
265266
<rule>
266267
key message
267268
pattern /kubelet:/

logan/helm-chart/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ fluentd:
153153
# Specifies the encoding of logs. By default, in_tail emits string value as ASCII-8BIT encoding. If encoding is specified, in_tail changes string to given encoding.
154154
# When encoding is set at this level, it gets applied to all the logs being collected. Instead, it can also be set at individual logs under sections like kubernetesSystem, genericContainerLogs, customLogs etc.
155155
# encoding:
156+
157+
# Configuration for rewrite_tag plugin
158+
rewriteTagPlugin:
159+
hostname_command: "cat /etc/hostname"
160+
156161
# Configuration for Kubernetes System specific logs like Kube Flannel, Kube Proxy etc.
157162
kubernetesSystem:
158163
# Setting the following properties will override the default/generic configuration and applies to all Kubernetes system logs

logan/kubernetes-resources/logs-collection/configmap-cri.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@ data:
479479
# Match block to filter kubelet logs from syslogs
480480
<match oci.oke.syslog.messages.**>
481481
@type rewrite_tag_filter
482+
hostname_command cat /etc/hostname
482483
<rule>
483484
key message
484485
pattern /kubelet:/

logan/kubernetes-resources/logs-collection/configmap-docker.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ data:
402402
# Match block to filter kubelet logs from syslogs
403403
<match oci.oke.syslog.messages.**>
404404
@type rewrite_tag_filter
405+
hostname_command cat /etc/hostname
405406
<rule>
406407
key message
407408
pattern /kubelet:/

0 commit comments

Comments
 (0)