grok_exporter icon indicating copy to clipboard operation
grok_exporter copied to clipboard

grok exporter not reading the new log file after moving directory

Open nazar200 opened this issue 4 years ago • 1 comments
trafficstars

In our environment we use grok exporter to monitor the application log file and report metrics.

We face problem when we deploy the new application. During the deployment the existing application home directory will be moved to application.previous and new application home directory will get create.

After the deployment grok exporter not reading the new log file and we have to restart the grok exporter evert time after the deployment.

global: config_version: 3

server: protocol: http port: 7250

input: type: file readall: false # Read from the beginning of the file? False means we start at the end of the file and read only new lines. fail_on_missing_logfile: true

nazar200 avatar Jun 04 '21 05:06 nazar200

True, this happens because grok_exporter uses the directory to learn when a logfile is moved, and this will fail if the directory is gone. It's hard to fix this. Restarting grok_exporter sounds like a good workaround.

fstab avatar Aug 09 '21 19:08 fstab