Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with filelog Receiver: "no files match the configured criteria" #36969

Open
NamanGajjar26 opened this issue Dec 27, 2024 · 1 comment
Open
Labels
needs triage New item requiring triage receiver/filelog

Comments

@NamanGajjar26
Copy link

NamanGajjar26 commented Dec 27, 2024

Component(s)

receiver/filelog

Describe the issue you're reporting

Description:

I'm encountering an issue with the filelog receiver in the OpenTelemetry Collector when attempting to read log files. The error message indicates that no files match the configured criteria, even though the file exists and contains logs.

Here is the error message:

fileconsumer/file.go:49 finding files {"kind": "receiver", "name": "filelog", "data_type": "logs", "component": "fileconsumer", "error": "no files match the configured criteria"}

The log file contains the following entries:

 2024-12-27T18:18:34.782112+05:30 administrator-B450M-DS3H-WIFI systemd[1]: Started fwupd.service - Firmware update daemon.
 2024-12-27T18:18:34.806715+05:30 administrator-B450M-DS3H-WIFI systemd[1]: fwupd-refresh.service: Deactivated successfully.
 2024-12-27T18:18:34.806958+05:30 administrator-B450M-DS3H-WIFI systemd[1]: Finished fwupd-refresh.service - Refresh fwupd metadata and update motd.

Here is the configuration I am using:

receivers:
    filelog:
      include:
        - /var/log/mysyslog.log
      start_at: beginning
      operators:
        - type: regex_parser
          regex: '^(?P<timestamp>[^\s]+)\s(?P<hostname>[^\s]+)\s(?P<service>[^\s]+):\s(?P<message>.*)$'
          timestamp:
            parse_from: attributes.timestamp
            layout: '%Y-%m-%dT%H:%M:%S.%f'
          field_renames:
            attributes:
              hostname: host.name
              service: service.name     

pipelines:
  logs:
    receivers: [filelog]
    processors: [batch]
    exporters: [opensearch/log]
@NamanGajjar26 NamanGajjar26 added the needs triage New item requiring triage label Dec 27, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage New item requiring triage receiver/filelog
Projects
None yet
Development

No branches or pull requests

1 participant