Skip to content
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

grok exporter not reading the new log file after moving directory #156

Open
nazar200 opened this issue Jun 4, 2021 · 1 comment
Open

Comments

@nazar200
Copy link

nazar200 commented Jun 4, 2021

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

@fstab
Copy link
Owner

fstab commented Aug 9, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants