1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00

Install a newsyslog config file to rotate Librenms logs.

PR:		255427
Reported by:	James French <james@french.id.au>
This commit is contained in:
Dan Langille 2021-04-28 20:55:11 +00:00
parent 5c48802aac
commit 76bc66df08
3 changed files with 20 additions and 0 deletions

View File

@ -2,6 +2,7 @@
PORTNAME= librenms
PORTVERSION= 21.4.0
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= net-mgmt
MASTER_SITES= LOCAL/dvl:vendor
@ -194,4 +195,9 @@ post-install:
@${ECHO_CMD} "@dir(root,www,0775) ${WWWDIR}/${f}" >> ${TMPPLIST}
.endfor
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d
${INSTALL_DATA} ${FILESDIR}/newsyslog.conf.sample ${STAGEDIR}/${WWWDIR}/contrib/newsyslog.conf.sample
@${ECHO_CMD} "@dir etc/newsyslog.conf.d" >> ${TMPPLIST}
@${ECHO_CMD} "@sample ${WWWDIR}/contrib/newsyslog.conf.sample etc/newsyslog.conf.d/librenms.conf" >> ${TMPPLIST}
.include <bsd.port.mk>

View File

@ -0,0 +1,7 @@
# configuration file for newsyslog for librenms
#
# see newsyslog.conf(5) for details
#
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
/var/log/librenms/librenms.log www:www 644 7 * $D0 J /var/run/librenms/librenms.pid
/var/log/librenms/librenms-service.log www:www 644 7 * $D0 J /var/run/librenms/librenms.pid

View File

@ -11,6 +11,8 @@ with the following notes:
NOTE: setting sql-mode="" is no longer required. You can remove
it from /usr/local/etc/mysql/my.cnf
However, 'lower_case_table_names=0' is required.
HEADS UP
Polling via cron job has been removed.. Please use the Dispatcher.
@ -28,6 +30,11 @@ The service will log to /var/log/librems/librenms-service.log
see also https://docs.librenms.org/Extensions/Dispatcher-Service/
For log file rotation
* sample file installed to %%WWWDIR%%/contrib/newsyslog.conf.sample
* actual file installed, never overwriting, to %%PREFIX%%/etc/newsyslog.conf.d/librenms.conf
When converting from PYPOLLER to the Dispatcher Service (PYSERVICE),
these steps will help you get started: