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

Not able to receive logs with multiple wildcards #27231

Closed
kago-dk opened this issue Sep 26, 2023 · 3 comments
Closed

Not able to receive logs with multiple wildcards #27231

kago-dk opened this issue Sep 26, 2023 · 3 comments
Labels
bug Something isn't working receiver/filelog

Comments

@kago-dk
Copy link

kago-dk commented Sep 26, 2023

Component(s)

receiver/filelog

What happened?

Description

In OpenTelemetry Collector V0.86.0 (Windows 2022 Server), does a filelog receiver with the following configuration produce an error.

The same configuration worked fine in OpenTelemetry Collector V0.85.0.

Configuration
- "C://Users//*//AppData//Local//Application//Logs//App*.log"

Error
2023-09-26T15:46:26.015-0700 warn fileconsumer/file.go:61 finding files: find files with 'C://Users//*//AppData//Local//Application//Logs//App*.log' pattern: open Default User: Access is denied.

Steps to Reproduce

Use the "OpenTelemetry Collector configuration" included and check the OtelCol log file.

Expected Result

The configuration that worked in V0.85.0 would still work in V0.86.0

Collector version

v0.86.0

Environment information

Environment

Windows 2022 Server

OpenTelemetry Collector configuration

receivers:
  filelog:
    - "C://Users//user1//AppData//Local//Application//Logs//App*.log"
    - "C://Users//*//AppData//Local//Application//Logs//App*.log"  

The first line works, while the second line does not work anymore.

Log output

2023-09-26T15:46:26.015-0700 warn fileconsumer/file.go:61 finding files: find files with 'C://Users//*//AppData//Local//Application//Logs//App*.log' pattern: open Default User: Access is denied.

Additional context

No response

@kago-dk kago-dk added bug Something isn't working needs triage New item requiring triage labels Sep 26, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

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

@kago-dk kago-dk changed the title Not able to receive logs with dual wildcard Not able to receive logs with multiple wildcards Sep 26, 2023
@djaglowski
Copy link
Member

@kago-dk, we recently made a change so that errors encountered when trying to find files are logged. See #23768.

It's possible that what you are seeing is an error that was previously occurring but was not being logged.

@kago-dk
Copy link
Author

kago-dk commented Oct 15, 2023

Updated the configuration to exclude "Default User"
- "C://Users//[!Default User]//AppData//Local//Application//Logs//App.log"

@kago-dk kago-dk closed this as completed Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working receiver/filelog
Projects
None yet
Development

No branches or pull requests

2 participants