Hi Team, I am trying to receive logs from local us...
# support
s
Hi Team, I am trying to receive logs from local using filelog reciever , I have tried multple things in
include
still getting same error
no files match the configured criteria
.I have tried following some previous threads were of now help. can someone please help here
Copy code
receivers:
  filelog:
    include: [ /Users/shashikumar/system.log ]
    start_at: beginning
processors:
  batch:
    send_batch_size: 1000
    timeout: 10s
  # Ref: <https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/README.md>
  resourcedetection:
    detectors: [env, system] # include ec2 for AWS, gcp for GCP and azure for Azure.
    # Using OTEL_RESOURCE_ATTRIBUTES envvar, env detector adds custom labels.
    timeout: 2s
    system:
      hostname_sources: [os] # alternatively, use [dns,os] for setting FQDN as host.name and os as fallback
extensions:
  health_check: {}
  zpages: {}
exporters:
  otlp:
    endpoint: "127.1.27.11:4317"
    tls:
      insecure: true
  logging:
    # verbosity of the logging export: detailed, normal, basic
    verbosity: normal
service:
  telemetry:
    metrics:
      address: 0.0.0.0:8888
  extensions: [health_check, zpages]
  pipelines:
    logs:
      receivers: [filelog]
      processors: [batch]
      exporters: [otlp]
n
Hi Shashi, can you verify that the OpenTelemetry Collector process has read permissions to the log file at
/Users/shashikumar/system.log
? Also, the
include
field supports glob patterns. Ensure that the path provided is not misinterpreted. You might want to try using a simpler pattern to start with something like
*.log
. Lastly, set the verbosity to detailed to get more logs with logs level set to debug, something like
Copy code
exporters:
 .....
  logging:
    verbosity: detailed  logs
service:
  telemetry:
    logs:
      level: debug
s
Thanks Nitish , it was permission issue .
n
nice, what did you exactly follow?
s
I was running otel collector in docker and was trying to access local files 🙂 . filelog receiver is only watching first file , Any clue
Copy code
Started watching file	{"kind": "receiver", "name": "filelog/A", "data_type": "logs", "component": "fileconsumer", "path": "/var/log/system.log"}
Copy code
filelog/A:
    include: [ /var/log/system.log , /var/log/shutdown_monitor.log]
    # include:
    # - /var/log/system.log
    # - /var/log/shutdown_monitor.log
    start_at: beginning
371 Views