From owner-svn-ports-all@freebsd.org Sat Nov 23 11:35:43 2019 Return-Path: Delivered-To: svn-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 5973E1B280C; Sat, 23 Nov 2019 11:35:43 +0000 (UTC) (envelope-from 0mp@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47Krp71gzjz3xKP; Sat, 23 Nov 2019 11:35:43 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1CCF4B3C0; Sat, 23 Nov 2019 11:35:43 +0000 (UTC) (envelope-from 0mp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xANBZgi6062451; Sat, 23 Nov 2019 11:35:42 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xANBZgH0062444; Sat, 23 Nov 2019 11:35:42 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <201911231135.xANBZgH0062444@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: 0mp set sender to 0mp@FreeBSD.org using -f From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 23 Nov 2019 11:35:41 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r518221 - in head/net-mgmt: . mysql-snmp mysql-snmp/files X-SVN-Group: ports-head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: in head/net-mgmt: . mysql-snmp mysql-snmp/files X-SVN-Commit-Revision: 518221 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Nov 2019 11:35:43 -0000 Author: 0mp Date: Sat Nov 23 11:35:41 2019 New Revision: 518221 URL: https://svnweb.freebsd.org/changeset/ports/518221 Log: New port: net-mgmt/mysql-snmp: Net-SNMP Perl agent for monitoring MySQL servers mysql-snmp is a MySQL Net-SNMP agent written in Perl, and using the Net-SNMP Perl bindings. It connects to a MySQL server and returns information to Net-SNMP when needed. It parses SHOW INNODB STATUS and other MySQL status variables. WWW: https://github.com/masterzen/mysql-snmp Reported by: mwlucas Reviewed by: danfe Differential Revision: https://reviews.freebsd.org/D22480 Added: head/net-mgmt/mysql-snmp/ head/net-mgmt/mysql-snmp/Makefile (contents, props changed) head/net-mgmt/mysql-snmp/distinfo (contents, props changed) head/net-mgmt/mysql-snmp/files/ head/net-mgmt/mysql-snmp/files/mysql-snmp.in (contents, props changed) head/net-mgmt/mysql-snmp/pkg-descr (contents, props changed) head/net-mgmt/mysql-snmp/pkg-plist (contents, props changed) Modified: head/net-mgmt/Makefile Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Sat Nov 23 11:08:06 2019 (r518220) +++ head/net-mgmt/Makefile Sat Nov 23 11:35:41 2019 (r518221) @@ -132,6 +132,7 @@ SUBDIR += mrtg SUBDIR += mrtg-ping-probe SUBDIR += mtrace + SUBDIR += mysql-snmp SUBDIR += mysqld_exporter SUBDIR += nagcon SUBDIR += nagios Added: head/net-mgmt/mysql-snmp/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/mysql-snmp/Makefile Sat Nov 23 11:35:41 2019 (r518221) @@ -0,0 +1,54 @@ +# $FreeBSD$ + +PORTNAME= mysql-snmp +DISTVERSIONPREFIX= v +DISTVERSION= 1.2-17 +DISTVERSIONSUFFIX= -g1d0b409 +CATEGORIES= net-mgmt perl5 + +MAINTAINER= 0mp@FreeBSD.org +COMMENT= Net-SNMP Perl agent for monitoring MySQL servers + +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING + +RUN_DEPENDS= net-snmp>=0:net-mgmt/net-snmp \ + p5-DBD-mysql>=0:databases/p5-DBD-mysql \ + p5-DBI>=0:databases/p5-DBI \ + p5-Math-BigInt-GMP>=0:math/p5-Math-BigInt-GMP \ + p5-Net-SNMP>=5.4.3:net-mgmt/p5-Net-SNMP \ + p5-Unix-Syslog>=0:sysutils/p5-Unix-Syslog + +USES= perl5 shebangfix +USE_GITHUB= yes +GH_ACCOUNT= masterzen +USE_PERL5= run test +USE_RC_SUBR= mysql-snmp +SHEBANG_FILES= mysql-snmp opennms/* tests/test.pl + +NO_ARCH= yes +NO_BUILD= yes +SUB_LIST= PERL=${PERL} + +OPTIONS_DEFINE= DOCS + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/mysql-snmp ${STAGEDIR}${PREFIX}/sbin + @${MKDIR} ${STAGEDIR}${PREFIX}/share/snmp/mibs + ${INSTALL_DATA} ${WRKSRC}/MYSQL-SERVER-MIB.txt \ + ${STAGEDIR}${PREFIX}/share/snmp/mibs + ${INSTALL_MAN} ${WRKSRC}/mysql-snmp.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 + @${MKDIR} ${STAGEDIR}${DATADIR} + (cd ${WRKSRC} && ${COPYTREE_SHARE} opennms ${STAGEDIR}/${DATADIR}) + @${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/my.cnf ${STAGEDIR}${ETCDIR}/my.cnf.sample + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} + +do-test: + @(cd ${WRKSRC} && \ + ${SETENV} ${TEST_ENV} ${PERL5} -I ${STAGEDIR}${PREFIX}/sbin ./tests/test.pl) + +.include Added: head/net-mgmt/mysql-snmp/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/mysql-snmp/distinfo Sat Nov 23 11:35:41 2019 (r518221) @@ -0,0 +1,3 @@ +TIMESTAMP = 1574345554 +SHA256 (masterzen-mysql-snmp-v1.2-17-g1d0b409_GH0.tar.gz) = ade77cefeb835650bfc3859bcb91c341f83394e38c5434f0fc4b4e5fab47585d +SIZE (masterzen-mysql-snmp-v1.2-17-g1d0b409_GH0.tar.gz) = 59825 Added: head/net-mgmt/mysql-snmp/files/mysql-snmp.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/mysql-snmp/files/mysql-snmp.in Sat Nov 23 11:35:41 2019 (r518221) @@ -0,0 +1,33 @@ +#! /bin/sh - + +# $FreeBSD$ +# +# PROVIDE: mysql-snmp +# REQUIRE: DAEMON mysql +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# mysql_snmp_enable (bool): Set to NO by default. +# Set it to YES to enable mysql_snmp. +# mysql_snmp_config (path): Set to %%ETCDIR%%/my.cnf +# by default. + +. /etc/rc.subr + +name="mysql_snmp" +rcvar="mysql_snmp_enable" + +load_rc_config "$name" + +: ${mysql_snmp_enable:="NO"} +: ${mysql_snmp_config="%%ETCDIR%%/my.cnf"} + +command_interpreter="%%PERL%%" +command="%%PREFIX%%/sbin/mysql-snmp" +pidfile="/var/run/mysql-snmp.pid" + +command_args="--config $mysql_snmp_config" + +run_rc_command "$1" Added: head/net-mgmt/mysql-snmp/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/mysql-snmp/pkg-descr Sat Nov 23 11:35:41 2019 (r518221) @@ -0,0 +1,7 @@ +mysql-snmp is a MySQL Net-SNMP agent written in Perl, and using the Net-SNMP +Perl bindings. + +It connects to a MySQL server and returns information to Net-SNMP when needed. +It parses SHOW INNODB STATUS and other MySQL status variables. + +WWW: https://github.com/masterzen/mysql-snmp Added: head/net-mgmt/mysql-snmp/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/mysql-snmp/pkg-plist Sat Nov 23 11:35:41 2019 (r518221) @@ -0,0 +1,11 @@ +@mode 600 +@sample %%ETCDIR%%/my.cnf.sample +@mode +man/man1/mysql-snmp.1.gz +sbin/mysql-snmp +%%PORTDOCS%%%%DOCSDIR%%/README +%%DATADIR%%/opennms/mysql.datacollection-config.xml +%%DATADIR%%/opennms/mysql.snmp-graph.properties +%%DATADIR%%/opennms/tools/cacti2MIB.pl +%%DATADIR%%/opennms/tools/cacti2opennms.pl +share/snmp/mibs/MYSQL-SERVER-MIB.txt