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

[receiver/filelog] Limiting "finding files: no files match the configured criteria" logs #27094

Closed
omrozowicz-splunk opened this issue Sep 25, 2023 · 2 comments · Fixed by #27097
Labels
enhancement New feature or request receiver/filelog

Comments

@omrozowicz-splunk
Copy link
Contributor

omrozowicz-splunk commented Sep 25, 2023

Component(s)

receiver/filelog

Is your feature request related to a problem? Please describe.

Some users use filelog receiver as a part of a tool for Kubernetes logs monitoring. They configure agents as Deamonset with one config for every physical node, and on some of them the file does not exist - which is an expected behaviour.

On an older version 0.70.0, only one finding files: no files match the configured criteria {"kind": "receiver", "name": "filelog/localhostlog" message was produced, while on the latest version it is logged on every poll():

2023-09-24T23:21:00.934Z	info	fileconsumer/file.go:118	finding files: no files match the configured criteria	{"kind": "receiver", "name": "filelog/localhostlog", "data_type": "logs", "component": "fileconsumer"}
2023-09-24T23:21:02.134Z	info	fileconsumer/file.go:118	finding files: no files match the configured criteria	{"kind": "receiver", "name": "filelog/localhostlog", "data_type": "logs", "component": "fileconsumer"}
2023-09-24T23:21:03.334Z	info	fileconsumer/file.go:118	finding files: no files match the configured criteria	{"kind": "receiver", "name": "filelog/localhostlog", "data_type": "logs", "component": "fileconsumer"}
2023-09-24T23:21:04.334Z	info	fileconsumer/file.go:118	finding files: no files match the configured criteria	{"kind": "receiver", "name": "filelog/localhostlog", "data_type": "logs", "component": "fileconsumer"}

And it's flooding agent's log.

Describe the solution you'd like

I know that this can be treated as an expected behaviour, but this is not an error message, just an info - so I am not sure if logging it out as frequently is absolutely required. I was thinking about adding a log limiter just for this finding files log.

Describe alternatives you've considered

A workaround for this is setting logging level to warn, but this also removes any other info message user considered important.

Additional context

No response

@omrozowicz-splunk omrozowicz-splunk added enhancement New feature or request needs triage New item requiring triage labels Sep 25, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

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

@dlorent
Copy link

dlorent commented Sep 25, 2023

Was just about to submit this issue.

It's quite annoying with the excessive logging.

In my case, i'm using it to log some specific otel-collectors which is not necessarily running on each host. producing constant warnings with.

opentelemetry-collector-agent-kw5jv opentelemetry-collector 2023-09-25T10:10:08.552Z	warn	fileconsumer/file.go:118	finding files: no files match the configured criteria	{"kind": "receiver", "name": "filelog", "data_type": "logs", "component": "fileconsumer"}

djaglowski added a commit that referenced this issue Sep 25, 2023
Resolves #27094

We still log this message if no files are found when the collector starts. However, the recurring message has proven to be a undesirable in many cases.
@crobert-1 crobert-1 removed the needs triage New item requiring triage label Sep 25, 2023
djaglowski added a commit that referenced this issue Sep 25, 2023
)

Resolves
#27094

We still log this message if no files are found when the collector
starts. However, the recurring message has proven to be a undesirable in
many cases.
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue Nov 12, 2023
…n-telemetry#27097)

Resolves
open-telemetry#27094

We still log this message if no files are found when the collector
starts. However, the recurring message has proven to be a undesirable in
many cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request receiver/filelog
Projects
None yet
3 participants