<source>
@id containers.log
@type tail
@label @SPLUNK
tag tail.containers.*
path "/var/log/containers/*\"#{ENV['MY_POD_NAME']}\"*.log"
pos_file /tmp/splunk-fluentd-containers.log.pos
path_key source
read_from_head true
<parse>
@type json
time_key time
time_type string
time_format %Y-%m-%dT%H:%M:%S.%NZ
localtime false
</parse>
</source>
Environment variable in the path is not working.
Also, is there a way to see what path it's constructing? I enabled debug but don't see the path it is evaluating.
And no errors in the logs.
Never mind I tried without the \" and it works
Never mind I tried without the " and it works
I tried without " in helm chart and know it looks
path /var/log/containers/#{ENV['GREP_KEY']}.log ====> path "/var/log/containers/#{ENV[\'GREP_KEY\']}.log"
Most helpful comment
Never mind I tried without the \" and it works