diff --git a/doc/Installation/Installation-CentOS-6-Apache-Nginx.md b/doc/Installation/Installation-CentOS-6-Apache-Nginx.md index bbd64a4ba1..22682ead26 100644 --- a/doc/Installation/Installation-CentOS-6-Apache-Nginx.md +++ b/doc/Installation/Installation-CentOS-6-Apache-Nginx.md @@ -185,7 +185,7 @@ If you are running Apache 2.2.18 or higher (current version in Centos 7 official ``` -If the file `/etc/httpd/conf.d/welcome.conf` exists, you will want to remove that as well unless you're familiar with [Name-based Virtual Hosts](https://httpd.apache.org/docs/2.2/vhosts/name-based.html). +If the file `/etc/httpd/conf.d/welcome.conf` exists, you will want to remove that as well unless you're familiar with [Name-based Virtual Hosts](https://httpd.apache.org/docs/2.2/vhosts/name-based.html). ```bash rn /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.d/welcome.conf.bak ``` @@ -377,6 +377,12 @@ Create the cronjob cp librenms.nonroot.cron /etc/cron.d/librenms +### Copy logrotate config ### + +LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can become large and be rotated out. To rotate out the old logs you can use the provided logrotate config file: + + cp misc/librenms.logrotate /etc/logrotate.d/librenms + ### Daily Updates ### LibreNMS performs daily updates by default. At 00:15 system time every day, a `git pull --no-edit --quiet` is performed. You can override this default by editing diff --git a/doc/Installation/Installation-CentOS-7-Apache.md b/doc/Installation/Installation-CentOS-7-Apache.md index a699e6f13c..62f3fccede 100644 --- a/doc/Installation/Installation-CentOS-7-Apache.md +++ b/doc/Installation/Installation-CentOS-7-Apache.md @@ -137,6 +137,12 @@ systemctl restart snmpd `cp librenms.nonroot.cron /etc/cron.d/librenms` +#### Copy logrotate config + +LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can become large and be rotated out. To rotate out the old logs you can use the provided logrotate config file: + + cp misc/librenms.logrotate /etc/logrotate.d/librenms + #### Final steps ```bash diff --git a/doc/Installation/Installation-CentOS-7-Nginx.md b/doc/Installation/Installation-CentOS-7-Nginx.md index fcdb6747c2..0edd59042f 100644 --- a/doc/Installation/Installation-CentOS-7-Nginx.md +++ b/doc/Installation/Installation-CentOS-7-Nginx.md @@ -35,7 +35,7 @@ sql-mode="" ### Web Server ### -#### Install / Configure Nginx +#### Install / Configure Nginx ```bash yum install epel-release @@ -160,6 +160,12 @@ systemctl restart snmpd `cp librenms.nonroot.cron /etc/cron.d/librenms` +#### Copy logrotate config + +LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can become large and be rotated out. To rotate out the old logs you can use the provided logrotate config file: + + cp misc/librenms.logrotate /etc/logrotate.d/librenms + #### Final steps ```bash diff --git a/doc/Installation/Installation-Ubuntu-1404-Apache.md b/doc/Installation/Installation-Ubuntu-1404-Apache.md index 10fcc29226..36b0b88984 100644 --- a/doc/Installation/Installation-Ubuntu-1404-Apache.md +++ b/doc/Installation/Installation-Ubuntu-1404-Apache.md @@ -206,6 +206,12 @@ Create the cronjob cp librenms.nonroot.cron /etc/cron.d/librenms +### Copy logrotate config ### + +LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can become large and be rotated out. To rotate out the old logs you can use the provided logrotate config file: + + cp misc/librenms.logrotate /etc/logrotate.d/librenms + ### Daily Updates ### LibreNMS performs daily updates by default. At 00:15 system time every day, a `git pull --no-edit --quiet` is performed. You can override this default by editing your `config.php` file. Remove the comment (the `#` mark) on the line: diff --git a/doc/Installation/Installation-Ubuntu-1404-Lighttpd.md b/doc/Installation/Installation-Ubuntu-1404-Lighttpd.md index 6870591b15..b04de9fcc0 100644 --- a/doc/Installation/Installation-Ubuntu-1404-Lighttpd.md +++ b/doc/Installation/Installation-Ubuntu-1404-Lighttpd.md @@ -185,6 +185,12 @@ Create the cronjob cp librenms.nonroot.cron /etc/cron.d/librenms +### Copy logrotate config ### + +LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can become large and be rotated out. To rotate out the old logs you can use the provided logrotate config file: + + cp misc/librenms.logrotate /etc/logrotate.d/librenms + ### Daily Updates ### LibreNMS performs daily updates by default. At 00:15 system time every day, a `git pull --no-edit --quiet` is performed. You can override this default by editing your `config.php` file. Remove the comment (the `#` mark) on the line: diff --git a/doc/Installation/Installation-Ubuntu-1404-Nginx.md b/doc/Installation/Installation-Ubuntu-1404-Nginx.md index 6657198214..c13dc2966b 100644 --- a/doc/Installation/Installation-Ubuntu-1404-Nginx.md +++ b/doc/Installation/Installation-Ubuntu-1404-Nginx.md @@ -212,6 +212,12 @@ Create the cronjob cp librenms.nonroot.cron /etc/cron.d/librenms +### Copy logrotate config ### + +LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can become large and be rotated out. To rotate out the old logs you can use the provided logrotate config file: + + cp misc/librenms.logrotate /etc/logrotate.d/librenms + ### Daily Updates ### LibreNMS performs daily updates by default. At 00:15 system time every day, a `git pull --no-edit --quiet` is performed. You can override this default by editing your `config.php` file. Remove the comment (the `#` mark) on the line: diff --git a/doc/Installation/Installation-Ubuntu-1604-Apache.md b/doc/Installation/Installation-Ubuntu-1604-Apache.md index 3f187f35e4..c4636c2466 100644 --- a/doc/Installation/Installation-Ubuntu-1604-Apache.md +++ b/doc/Installation/Installation-Ubuntu-1604-Apache.md @@ -121,6 +121,12 @@ systemctl restart snmpd `cp librenms.nonroot.cron /etc/cron.d/librenms` +#### Copy logrotate config + +LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can become large and be rotated out. To rotate out the old logs you can use the provided logrotate config file: + + cp misc/librenms.logrotate /etc/logrotate.d/librenms + #### Final steps ```bash diff --git a/doc/Installation/Installation-Ubuntu-1604-Nginx.md b/doc/Installation/Installation-Ubuntu-1604-Nginx.md index e117cc7b18..02a840afa6 100644 --- a/doc/Installation/Installation-Ubuntu-1604-Nginx.md +++ b/doc/Installation/Installation-Ubuntu-1604-Nginx.md @@ -125,6 +125,12 @@ systemctl restart snmpd `cp librenms.nonroot.cron /etc/cron.d/librenms` +#### Copy logrotate config + +LibreNMS keeps logs in `/opt/librenms/logs`. Over time these can become large and be rotated out. To rotate out the old logs you can use the provided logrotate config file: + + cp misc/librenms.logrotate /etc/logrotate.d/librenms + #### Final steps ```bash diff --git a/misc/librenms.logrotate b/misc/librenms.logrotate new file mode 100644 index 0000000000..64eed9efe9 --- /dev/null +++ b/misc/librenms.logrotate @@ -0,0 +1,9 @@ +# /etc/logrotate.d/librenms +/opt/librenms/logs/*.log { + weekly + rotate 6 + compress + delaycompress + missingok + notifempty +}