-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Telegraf 1.5.3 and 1.6 Logparser quit logging after logfile is recreated/rotated #3906
Comments
Possibly related to #2847 |
Same or similar issue reported in the |
After migration to telegraf 1.8 and tail plugin with grok data_format this issue seems to be resolved for me. |
Still see this in 1.10 (with inotify and epoll), but not every time, this is kind of random behavior. Also sometimes it just ingests only some of the metrics. |
@bolek2000 Is this a consistent problem in the latest Telegraf? |
I am not sure if this problem is solved, because we built a workaround that is still in place. We have our own nginx access log preprocessing script, which sorts time slices of buffered logs chronologically and then appends the sorted lines to a new logfile, which gets ingested by inputs.tail plugin. But when we rotate/truncate the logfile we always do a |
We have integrated the telegraf restarting into an icinga check. Over a set of 100 servers, every day some of them need telegraf to be restarted because it stopped parsing the logs. We're on telegraf 1.15.3 now. |
Updated to 1.16.0 and still seeing log messages like
So the fixes in 1.16.0 at least don't fix this particular issue |
Closing this as logparser is deprecated. |
Bug report
Running Telegraf 1.5.3 or 1.6.0 on Redhat Linux, using the logparser plugin.
Every night certain logfiles are rotated via org.apache.log4j.DailyRollingFileAppender.
Our telegraf is watching these logs, and when they get renamed, telegraf stops collecting updates - maybe telegraf is holding on the the file handle… I have tried watch_method = poll AND inotify.
THIS WAS REPORTED AND APPARENTLY FIXED IN TELEGRAF 1.3, ISSUE #2967
Relevant telegraf.conf:
[[inputs.logparser]]
name_override = "PartnerAPI_Error_Events"
files = [ "/zoom/logs/events.log" ]
from_beginning = false
watch_method = "inotify"
[inputs.logparser.grok]
...
System info:
[Include Telegraf version, operating system name, and other relevant details]
Telegraf 1.6.0 on Redhat Linux
Steps to reproduce:
Expected behavior:
Actual behavior:
Additional info:
[Include gist of relevant config, logs, etc.]
The text was updated successfully, but these errors were encountered: