Brian Tang
04/20/2023, 8:15 AMnodeName
the pod is currently running on. based on the docs here and the code here, i try to access {{.hostname}}
in the logging configuration, but it’s not populating the template correctly: it’s missing the node name stilllogging:
level: 1
plugins:
cloudwatch:
enabled: true
templateUri: |-
<https://console.aws.amazon.com/cloudwatch/home?region=ap-southeast-1#logEventViewer:group=/aws/containerinsights/ncai-dev/application;stream={{.hostname}}-application.var.log.containers.{{.podName}}_{{.namespace}}_{{.containerName}}-{{.containerId}}.log>
Note {{.hostname}}
right before -application.var.log.containers.xxxx
getTaskLog
doesn’t take in a hostname
, and even the tests don’t test for hostname
.Ketan (kumare3)
Brian Tang
04/21/2023, 4:01 PMKetan (kumare3)
Andrew Dye
04/27/2023, 4:57 AM...stream=var.log.containers.{{ .podName }}_{{ .namespace }}_{{ .containerName }}-{{ .containerId }}.log
, which is why I suspect most other users haven't encountered thisBrian Tang
04/27/2023, 8:26 AMhostname
is the correct template param, or if the new change requires pod.Spec.NodeName
that @EngHabu was referncingAndrew Dye
04/27/2023, 1:32 PMlogStreamNameFilter
which can match a known subset of the stream (and ignore hostname)? While some installs may have hostname prefix by default, I recently used this chart which has a fluentbit-
prefix. Using logStreamNameFilter
may be the safest bet for Flyte's default plugin config.Haytham Abuelfutuh
jeev
logging:
level: 1
plugins:
cloudwatch:
enabled: true
templateUri: |-
<https://ap-southeast-1.console.aws.amazon.com/cloudwatch/home?region=ap-southeast-1#logsV2:log-groups/log-group/$252Faws$252Fcontainerinsights$252Fncai-dev$252Fapplication$3FlogStreamNameFilter$3Dapplication.var.log.containers.{{.podName}}_{{.namespace}}_{{.containerName}}-{{.containerId}}.log>
Brian Tang
05/10/2023, 10:14 AM