Skip to content

Commit b84f6db

Browse files
author
Anh Pham
committed
Fix tailing logs stops working sometimes
prometheus-nginx-log-exporter stopped tailing logs on many of my servers after sometimes and needed a manual restart to start working again. Switching from inotify (default) to poll might help to fix the issue.
1 parent bced25e commit b84f6db

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ func monitorFile(file string, parser *gonx.Parser, metrics *metrics, extraLabelV
110110
t, err := tail.TailFile(file, tail.Config{
111111
Follow: true,
112112
ReOpen: true,
113+
Poll: true,
113114
Location: location,
114115
})
115116
if err != nil {

0 commit comments

Comments
 (0)