Describe the bug
The Exclude_Path option of the tail input plugin is no longer working after upgrading from 1.3.10 to 1.4.1. Log messages from excluded files get parsed anyway.
To Reproduce
Exclude certain log files, for example from kubernetes namespace poi and enable debug logging (thanks for adding the possibility to define log levels per plugin!)
[INPUT]
Name tail
Path /var/log/containers/*.log
Exclude_Path /var/log/containers/*_poi_*.log
Log_Level debug
...
Files get parsed anyway:
[2020/03/31 10:08:46] [debug] [input:tail:tail.0] file=/var/log/containers/poi-dev-tree-importer-78fbd859c8-82cgq_poi_poi-dev-tree-importer-e8204a85b5d9277f829a032ac6ad5fb448d5bc42e39261204406480783f240b4.log read=31111 lines=39
Expected behavior
Log file is excluded (worked in v1.3.10).
Your Environment
@GeorgFleig thanks for reporting this issue.
I've pushed the fix b4639ac4 and adjusted our unit test since it did not trap the problem.
I will release v1.4.2 shortly with the fixes in place.
Thanks for the quick fix!
Most helpful comment
@GeorgFleig thanks for reporting this issue.
I've pushed the fix b4639ac4 and adjusted our unit test since it did not trap the problem.
I will release v1.4.2 shortly with the fixes in place.