-
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
Logparser plugin don't process new lines after telegraf configuration reload. #3573
Comments
To work around bug #3906 I do a |
Closing based on #5347 (comment) |
This issue is still valid :( I have found the issue though. In hpcloud/tail (influxdata/tail) there is a problem: In this function, it is possible for shared.watchNums[fname] to go negative. When debugging, I found that it would decrement once because of tomb.Tomb's Dying() triggering:
and again due to tail.Cleanup() being called
|
* Fixes influxdata#3522 - Not able to read rotated log file without missing lines * Fixes influxdata#3573 - logparser/tail plugin stop after reload (removes unnecessary tailer.Cleanup() calls)
Bug report
The newly started telegraf works well, but after configuration reload via SIGHUP, new lines in log aren't parsed or sent to output plugin. Other metrics aren't affected.
Relevant telegraf.conf:
/etc/telegraf/telegraf.conf
/etc/telegraf/telegraf.d/logparser.conf
System info:
Centos 7.2
Telegraf 1.4.3,1.4.5
Steps to reproduce:
echo '[-] 192.168.1.1 - - [12/Dec/2017:14:00:47 +0300] "GET /app HTTP/1.1" 501 178 "-" "axios/0.16.2" "-" "127.0.0.1" (.) rt=1.001 uht=1.001 urt=1.001' >> /var/log/nginx/web-api-access.log
select last("request_time") from "nginx_access_log" limit 1
must be 1.001kill -HUP $PID
echo '[-] 192.168.1.1 - - [12/Dec/2017:14:05:47 +0300] "GET /app HTTP/1.1" 502 178 "-" "axios/0.16.2" "-" "127.0.0.1" (.) rt=2.002 uht=2.002 urt=2.002' >> /var/log/nginx/web-api-access.log
Additional info:
Telegraf log output:
The text was updated successfully, but these errors were encountered: