-
Bug
-
Resolution: Done
-
Major
-
None
-
False
-
None
-
False
-
NEW
-
NEW
-
-
-
Important
Description of problem:
Vector collector logs INFO messages every time it starts/stops watching a new file.
There are two problems with this
- it makes WARN/ERROR messages in the vector logs hard to see.
- It has a potentioally serious performance impact, the cost of writing the log to stderr for every file create/delete event is high compared to registering/unregsitering the file in memory. In a busy filesystem it may slow down the file watcher and cause missed events.
Version-Release number of selected component (if applicable):
Issue exists on current master branch, afffets all released 5.x versions to date.
How reproducible: 100%
Steps to Reproduce:
Run the collector, examine the logs:
oc logs -n openshift-logging -l component=collector
Actual results:
Many INFO messages like these:
2023-01-08T22:19:55.721166Z INFO source{component_kind="source" component_id=raw_k8s_audit_logs component_type=file component_name=raw_k8s_audit_logs}:file_server: vector::internal_events::file::source: Stopped watching file. file=/var/log/kube-apiserver/audit.log 2023-01-08T22:42:29.945124Z INFO source{component_kind="source" component_id=raw_k8s_audit_logs component_type=file component_name=raw_k8s_audit_logs}:file_server: vector::internal_events::file::source: Found new file to watch. file=/var/log/kube-apiserver/audit.log 2023-01-08T22:42:35.871859Z INFO source{component_kind="source" component_id=raw_k8s_audit_logs component_type=file component_name=raw_k8s_audit_logs}:file_server: vector::internal_events::file::source: Stopped watching file. file=/var/log/kube-apiserver/audit.log 2023-01-08T23:05:03.426582Z INFO source{component_kind="source" component_id=raw_k8s_audit_logs component_type=file component_name=raw_k8s_audit_logs}:file_server: vector::internal_events::file::source: Found new file to watch. file=/var/log/kube-apiserver/audit.log 2023-01-08T23:05:07.447528Z INFO source{component_kind="source" component_id=raw_k8s_audit_logs component_type=file component_name=raw_k8s_audit_logs}:file_server: vector::internal_events::file::source: Stopped watching file. file=/var/log/kube-apiserver/audit.log 2023-01-08T23:28:09.504914Z INFO source{component_kind="source" component_id=raw_k8s_audit_logs component_type=file component_name=raw_k8s_audit_logs}:file_server: vector::internal_events::file::source:
Expected results:
No INFO messages