mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
docs: Add logrotate config and update install docs (#5520)
This commit is contained in:
@@ -185,7 +185,7 @@ If you are running Apache 2.2.18 or higher (current version in Centos 7 official
|
||||
</Directory>
|
||||
</VirtualHost>
|
||||
```
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
9
misc/librenms.logrotate
Normal file
9
misc/librenms.logrotate
Normal file
@@ -0,0 +1,9 @@
|
||||
# /etc/logrotate.d/librenms
|
||||
/opt/librenms/logs/*.log {
|
||||
weekly
|
||||
rotate 6
|
||||
compress
|
||||
delaycompress
|
||||
missingok
|
||||
notifempty
|
||||
}
|
||||
Reference in New Issue
Block a user