Closed SantoshAvaji closed 5 months ago
This problem is more appropriate in the otel col contrib repo, However, I think you should read the fileexporter's
readme.md carefully first: https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/fileexporter
The official opentelemetry-collector-contrib container does not have a writable filesystem by default since it's built on the scratch layer. As such, you will need to create a writable directory for the path, potentially by mounting writable volumes or creating a custom image.
as @JaredTan95 said, this is a good question for the collector community, #otel-collector channel on CNCF Slack might be a good place to ask this. If there is any docs related issue please update accordingly
myconfig.yaml receivers:
otlp:
protocols:
grpc:
endpoint: [0.0.0.0:4317](http://0.0.0.0:4317/)
http:
endpoint: [0.0.0.0:4318](http://0.0.0.0:4318/)
processors:
batch: exporters:
file:
path: ./logs/test.txt extensions:
health_check:
pprof:
zpages:
service:
extensions: [health_check, pprof, zpages]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [file]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [file]
logs:
receivers: [otlp]
processors: [batch]
exporters: [file]
Command Executed :sudo docker run -v ./myconfig.yaml:/etc/otelcol-contrib/config.yaml -v ./te./logs:/logs otel/opentelemetry-collector-contrib:0.97.0 Error: cannot start pipelines: open ./logs/test.txt: permission denied
2024/04/15 17:23:54 collector server run finished with error: cannot start pipelines: open ./logs/test.txt: permission denied
I have created new file and provided all permission then given that path in yml config (It's in Ubuntu machine) exporters: file: path: ./filename.json
But facing an issue permission denied Unable to write file, please help me to resolve this issue asap