I spent a bit of time chasing down why I couldn't get the log parser to parse web logs to discover that telegraf didn't have read permissions on the relevant files.
It didn't produce any message on this failure including with debugging on, so this would likely be a feature request to not have it fail silently on errors, especially if you have debug on.
[Include Telegraf version, operating system name, and other relevant details]
1.4.1-1, Ubuntu 16.04
Some sort of error produced, especially with debugging turned on.
It continues to work as it should for other metrics.
Do not fail silently on errors. Include errors on STDOUT and/or in the logs, especially when debug is present.
This seems to happen when the directory containing the log cannot be read. If an unreadable file is in a readable directory you get the error:
2017-10-02T23:47:46Z E! Error in plugin [inputs.logparser]: open test: permission denied
That's likely true as when I encountered the issue both the directory and file itself was unreadable, and I did not test enabling read on them separately.
This one is particularly nasty, as the doc don't say anything about permissions...
I can't seem to get it to work at all for me, unless running the telegraf service as root. using setfacl for the user telegraf, permissions are all there, for both directories, and file, but yet still a silent fail and have no idea :/ Centos 7
@cjpit that sound like a selinux issue
tail pluginI can confirm this issue. It caused a few hours of wasted time. As stated above:
This seems to happen when the directory containing the log cannot be read.
I can verify this is still an issue on latest telegraf (1.8.3) and wasted couple of hours on this.
I can't seem to get it to work at all for me, unless running the telegraf service as root. using setfacl for the user telegraf, permissions are all there, for both directories, and file, but yet still a silent fail and have no idea :/ Centos 7
As stated above, I tried all permission stuffs as well as disabled SELINUX but no luck. Had to run telegraf service as root to get this working.
More clarity on this on doc or clear log entry about failing permission will be a lot useful.
As stated above, I tried all permission stuffs as well as disabled SELINUX but no luck. Had to run telegraf service as root to get this working.
More clarity on this on doc or clear log entry about failing permission will be a lot useful.
Would anyone be willing to open a PR for this?
Most helpful comment
I can verify this is still an issue on latest telegraf (1.8.3) and wasted couple of hours on this.
As stated above, I tried all permission stuffs as well as disabled SELINUX but no luck. Had to run telegraf service as root to get this working.
More clarity on this on doc or clear log entry about failing permission will be a lot useful.