Skip to content

Commit 255be97

Browse files
committed
Add Pod name to logs
1 parent 642ced5 commit 255be97

File tree

3 files changed

+24
-13
lines changed

3 files changed

+24
-13
lines changed

charts/templates/configmap.yaml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,33 @@ data:
6161
6262
[FILTER]
6363
Name modify
64-
Match kube.marklogic.logs.request
65-
Add tag kube.marklogic.logs.request
64+
Match *
65+
Add pod ${POD_NAME}
6666
6767
[FILTER]
6868
Name modify
69-
Match kube.marklogic.logs.audit
70-
Add tag kube.marklogic.logs.audit
69+
Match kube.marklogic.logs.error
70+
Add tag kube.marklogic.logs.error
7171
7272
[FILTER]
7373
Name modify
74-
Match kube.marklogic.logs.crash
75-
Add tag kube.marklogic.logs.crash
74+
Match kube.marklogic.logs.access
75+
Add tag kube.marklogic.logs.access
7676
7777
[FILTER]
7878
Name modify
79-
Match kube.marklogic.logs.access
80-
Add tag kube.marklogic.logs.access
79+
Match kube.marklogic.logs.request
80+
Add tag kube.marklogic.logs.request
81+
82+
[FILTER]
83+
Name modify
84+
Match kube.marklogic.logs.audit
85+
Add tag kube.marklogic.logs.audit
8186
8287
[FILTER]
8388
Name modify
84-
Match kube.marklogic.logs.error
85-
Add tag kube.marklogic.logs.error
89+
Match kube.marklogic.logs.crash
90+
Add tag kube.marklogic.logs.crash
8691
8792
[FILTER]
8893
Name parser
@@ -104,7 +109,8 @@ data:
104109
Key_Name log
105110
Parser json_parser
106111
Reserve_Data On
107-
112+
113+
# Configure export to logging backend
108114
[OUTPUT]
109115
Name es
110116
Match *

charts/templates/statefulset.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ spec:
112112
- name: {{ .Values.logging.configMapName }}
113113
mountPath: /fluent-bit/etc/parsers.conf
114114
subPath: parsers.conf
115+
env:
116+
- name: POD_NAME
117+
valueFrom:
118+
fieldRef:
119+
fieldPath: metadata.name
115120
{{- end }}
116121
dnsConfig:
117122
searches:

charts/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ replicaCount: 1
55

66
# Marklogic image parameters
77
image:
8-
repository: marklogicdb/marklogic-db
9-
tag: 10.0-9.1-centos-1.0.0-ea4
8+
repository: marklogic-centos/marklogic-server-centos
9+
tag: 10-internal
1010
pullPolicy: IfNotPresent
1111

1212
# Configure the imagePullSecret to pull the image from private repository that requires credential

0 commit comments

Comments
 (0)