Add logrotate config #5520

merged 1 commit into from Jan 21, 2017


None yet

6 participants

vrillusions commented Jan 20, 2017 edited


Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

  • Have you signed the Contributors agreement - please do NOT submit a pull request unless you have (signing the agreement in the same pull request is fine). Your commit message for signing the agreement must appear as per the docs.
  • Have you followed our code guidelines?

This adds a logrotate config I've been using for a while now. Wasn't sure where to place the file as it seemed most setup-type things are just in base of repo. Let me know if it should be somewhere else / feel free to move it yourself

These are the file sizes I get with the weekly rotation with 15 devices

# ls -lh /opt/librenms/logs
total 6.0M
-rw-rw-r-- 1 librenms www-data  981 Jan 19 00:15 daily.log
-rw-rw-r-- 1 librenms www-data 1.4K Jan 15 00:15 daily.log.1
-rw-rw-r-- 1 librenms www-data  924 Jan  9 00:15 daily.log.2.gz
-rw-rw-r-- 1 librenms www-data  901 Jan  1 00:15 daily.log.3.gz
-rw-rw-r-- 1 librenms www-data  862 Dec 25 00:15 daily.log.4.gz
-rw-rw-r-- 1 librenms www-data  914 Dec 19 00:15 daily.log.5.gz
-rw-rw-r-- 1 librenms www-data  887 Dec 11 06:53 daily.log.6.gz
-rw-rw-r-- 1 librenms www-data 2.0M Jan 19 23:25 librenms.log
-rw-rw-r-- 1 librenms www-data 2.6M Jan 15 06:35 librenms.log.1
-rw-rw-r-- 1 librenms www-data 303K Jan  9 06:50 librenms.log.2.gz
-rw-rw-r-- 1 librenms www-data 266K Jan  1 06:51 librenms.log.3.gz
-rw-rw-r-- 1 librenms www-data 230K Dec 25 06:42 librenms.log.4.gz
-rw-rw-r-- 1 librenms www-data 305K Dec 19 06:56 librenms.log.5.gz
-rw-rw-r-- 1 librenms www-data 266K Dec 11 06:53 librenms.log.6.gz```

Excellent, I have been meaning to get around to this for a while as well.
I would like to see this add instructions to the setup docs as well.

laf commented Jan 20, 2017

I'd say this belongs in either scripts or misc.

Would you be able to update the install docs to use this by default?

murrant commented Jan 20, 2017

I vote for the misc directory, and yes, updating the docs would be great.


👍 I'll update docs and move it to misc. Should get that done tonight or at the very least this weekend.

laf commented Jan 20, 2017

Awesome :)

@vrillusions vrillusions Add logrotate config and update install docs

The inspection completed: No new issues

@laf laf merged commit a8c0446 into librenms:master Jan 21, 2017

2 checks passed

Auto-Deploy Build finished.
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment