From owner-dev-commits-ports-all@freebsd.org Wed Apr 28 21:26:28 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 402C9622CBC; Wed, 28 Apr 2021 21:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FVsBr1N5rz3Ncr; Wed, 28 Apr 2021 21:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2195815502; Wed, 28 Apr 2021 21:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 13SLQS1H012073; Wed, 28 Apr 2021 21:26:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 13SLQSsV012072; Wed, 28 Apr 2021 21:26:28 GMT (envelope-from git) Date: Wed, 28 Apr 2021 21:26:28 GMT Message-Id: <202104282126.13SLQSsV012072@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dan Langille Subject: git: 76bc66df08d2 - main - Install a newsyslog config file to rotate Librenms logs. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dvl X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76bc66df08d29254a5096c1b5865b39bced9c3ee Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Apr 2021 21:26:28 -0000 The branch main has been updated by dvl: URL: https://cgit.FreeBSD.org/ports/commit/?id=76bc66df08d29254a5096c1b5865b39bced9c3ee commit 76bc66df08d29254a5096c1b5865b39bced9c3ee Author: Dan Langille AuthorDate: 2021-04-28 20:55:11 +0000 Commit: Dan Langille CommitDate: 2021-04-28 21:26:24 +0000 Install a newsyslog config file to rotate Librenms logs. PR: 255427 Reported by: James French --- net-mgmt/librenms/Makefile | 6 ++++++ net-mgmt/librenms/files/newsyslog.conf.sample | 7 +++++++ net-mgmt/librenms/files/pkg-message.in | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/net-mgmt/librenms/Makefile b/net-mgmt/librenms/Makefile index 7cb6d8910d6b..9706fe5adbc4 100644 --- a/net-mgmt/librenms/Makefile +++ b/net-mgmt/librenms/Makefile @@ -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 diff --git a/net-mgmt/librenms/files/newsyslog.conf.sample b/net-mgmt/librenms/files/newsyslog.conf.sample new file mode 100644 index 000000000000..9420d72da579 --- /dev/null +++ b/net-mgmt/librenms/files/newsyslog.conf.sample @@ -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 diff --git a/net-mgmt/librenms/files/pkg-message.in b/net-mgmt/librenms/files/pkg-message.in index 0ebb82513216..b0944c13e761 100644 --- a/net-mgmt/librenms/files/pkg-message.in +++ b/net-mgmt/librenms/files/pkg-message.in @@ -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: