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

Disk buffer should be a ring-buffer #12

Closed
megastef opened this issue Jun 24, 2016 · 1 comment
Closed

Disk buffer should be a ring-buffer #12

megastef opened this issue Jun 24, 2016 · 1 comment

Comments

@megastef
Copy link
Contributor

Logagent buffers logs (by default 10000 bulk requests with a max. size of 1000 logs) on disk when shipping via HTTPS/HTTP fails. If such a problem remains longer, logagent would stop to buffer logs on disk. I think most users would prefer to drop the oldest file to keep most recent logs in the (always limited) disk buffer.

Current workarounds:

  1. If disk space is not an issue, one could increase the limit to a higher value e.g. 50k bulk files.
    export LOGSENE_MAX_STORED_REQUESTS=50000
  2. Run a chron job to delete oldest files form LOGSENE_TMP_DIR. Some potential solutions are here https://stackoverflow.com/questions/2960022/shell-script-to-count-files-then-remove-oldest-files

See https://github.com/sematext/logsene-js#environment-variables for further details of logsene-js settings.

@megastef
Copy link
Contributor Author

megastef commented Jul 2, 2016

Should be solved with the update to latest logsene-js e9ca4be - logsene-js deletes the oldest file, when the maximum number of stored files is reached - so the disk buffer behaves like a ring-buffer.

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

1 participant