I’m following exactly the same thing as a tutorial to add a fluent bit. But I’m getting an error that says “cannot open /opt/couchbase/var/lib/couchbase/logs/XXX.log”
# Cut down version with no real work in it to use for testing/debug
@include /fluent-bit/etc/couchbase/service.conf
# Just pull in all logs with no parsing at all or Multiline support
[INPUT]
Name tail
Alias simple_tail
Path ${COUCHBASE_LOGS}/*.log
Refresh_Interval 10
Skip_Long_Lines On
Path_Key filename
Tag couchbase.log.<logname>
Tag_Regex ${COUCHBASE_LOGS}/(?<logname>[^.]+).log$
@include /fluent-bit/etc/couchbase/out-stdout.conf
Hi, tommie, Thanks for the reply, I’m just using docker desktop (WSL ubuntu), and I’m following the same thing as the example provided in the documentation. As I understand security context can be a case if I put this on something like openshift. But here I’m in my local docker-desktop
So this is how i mounted volume
apiVersion: v1
kind: Secret
metadata:
name: fluent-bit-config
stringData:
fluent-bit.conf: |
[SERVICE]
flush 1
daemon Off
log_level Warning
parsers_file /fluent-bit/etc/parsers-couchbase.conf
# Include audit log only
@include /fluent-bit/etc/couchbase/in-audit-log.conf
# Send to the standard output
[OUTPUT]
name stdout
match couchbase.log.*
Got it, setup seems fine. It’s possible that the user of the fluent sidecar is running as a different user than the Couchbase user. Could you try explicitly setting a SecurityContext so see if this resolves the problem here?