From 5a9235f94e13beda8d4ef2c8705b26c67adb958c Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio" Date: Thu, 12 Oct 2017 14:02:39 +0000 Subject: [PATCH] New port databases/zabbix34-libzbxpgsql: PostgreSQL monitoring module for zabbix34-agent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This project provides comprehensive monitoring of PostgreSQL servers using a natively compiled Zabbix agent module, written in C. The module enables discovery and monitoring of tablespaces, databases, namespaces, tables, indexes, etc. WWW: http://cavaliercoder.com/libzbxpgsql/ databases/zabbix32-libzbxpgsql -> databases/zabbix34-libzbxpgsql PR: 222600 Submitted by: pg@pakhom.spb.ru Approved by: Martin Waschbüsch (maintainer) --- databases/Makefile | 1 + databases/zabbix34-libzbxpgsql/Makefile | 44 +++++++++++++++++++ databases/zabbix34-libzbxpgsql/distinfo | 3 ++ .../files/patch-src_libzbxpgsql.c | 12 +++++ databases/zabbix34-libzbxpgsql/pkg-descr | 7 +++ databases/zabbix34-libzbxpgsql/pkg-message | 3 ++ databases/zabbix34-libzbxpgsql/pkg-plist | 4 ++ 7 files changed, 74 insertions(+) create mode 100644 databases/zabbix34-libzbxpgsql/Makefile create mode 100644 databases/zabbix34-libzbxpgsql/distinfo create mode 100644 databases/zabbix34-libzbxpgsql/files/patch-src_libzbxpgsql.c create mode 100644 databases/zabbix34-libzbxpgsql/pkg-descr create mode 100644 databases/zabbix34-libzbxpgsql/pkg-message create mode 100644 databases/zabbix34-libzbxpgsql/pkg-plist diff --git a/databases/Makefile b/databases/Makefile index cab76512bf31..c25ac564dbfa 100644 --- a/databases/Makefile +++ b/databases/Makefile @@ -1048,6 +1048,7 @@ SUBDIR += zabbix22-libzbxpgsql SUBDIR += zabbix3-libzbxpgsql SUBDIR += zabbix32-libzbxpgsql + SUBDIR += zabbix34-libzbxpgsql SUBDIR += zodb3 .include diff --git a/databases/zabbix34-libzbxpgsql/Makefile b/databases/zabbix34-libzbxpgsql/Makefile new file mode 100644 index 000000000000..3f495cbd8ca1 --- /dev/null +++ b/databases/zabbix34-libzbxpgsql/Makefile @@ -0,0 +1,44 @@ +# Created by: Martin Waschbuesch +# $FreeBSD$ + +PORTNAME= libzbxpgsql +PORTVERSION= 1.1.0 +DISTVERSIONPREFIX= v +CATEGORIES= databases +PKGNAMEPREFIX= zabbix34- + +MAINTAINER= martin@waschbuesch.de +COMMENT= Zabbix agent module for comprehensive monitoring of PostgreSQL servers + +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING + +BUILD_DEPENDS= ${NONEXISTENT}:net-mgmt/${PKGNAMEPREFIX}agent:patch +RUN_DEPENDS= zabbix_agentd:net-mgmt/${PKGNAMEPREFIX}agent +LIB_DEPENDS= libconfig.so:devel/libconfig + +CONFLICTS= zabbix[0-24-9][0-13-9]-libzbxpgsql zabbix[0-9]-libzbxpgsql + +USES= autoreconf gmake libtool pgsql + +USE_GITHUB= yes +GH_ACCOUNT= cavaliercoder + +GNU_CONFIGURE= yes +GET_ZBX_WRKSRC= cd ${.CURDIR:H:H}/net-mgmt/${PKGNAMEPREFIX}agent && make -V WRKSRC +CONFIGURE_ARGS= --with-zabbix=$$(${GET_ZBX_WRKSRC}) + +USE_LDCONFIG= yes + +OPTIONS_DEFINE= EXAMPLES + +PORTSCOUT= skipv:latest,gh-pages + +do-install: + ${INSTALL_LIB} ${WRKSRC}/src/.libs/libzbxpgsql.so ${STAGEDIR}${PREFIX}/lib/libzbxpgsql.so + +do-install-EXAMPLES-on: + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/templates/*.xml ${STAGEDIR}${EXAMPLESDIR} + +.include diff --git a/databases/zabbix34-libzbxpgsql/distinfo b/databases/zabbix34-libzbxpgsql/distinfo new file mode 100644 index 000000000000..269563ce15d3 --- /dev/null +++ b/databases/zabbix34-libzbxpgsql/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1503755196 +SHA256 (cavaliercoder-libzbxpgsql-v1.1.0_GH0.tar.gz) = 50acc4364241253a013058daf76c4184cc522104f78005d3c4d5e7e09d77571a +SIZE (cavaliercoder-libzbxpgsql-v1.1.0_GH0.tar.gz) = 61106 diff --git a/databases/zabbix34-libzbxpgsql/files/patch-src_libzbxpgsql.c b/databases/zabbix34-libzbxpgsql/files/patch-src_libzbxpgsql.c new file mode 100644 index 000000000000..e1ae90077e39 --- /dev/null +++ b/databases/zabbix34-libzbxpgsql/files/patch-src_libzbxpgsql.c @@ -0,0 +1,12 @@ +--- src/libzbxpgsql.c.orig 2016-06-25 14:18:03 UTC ++++ src/libzbxpgsql.c +@@ -24,6 +24,9 @@ + */ + + #include "libzbxpgsql.h" ++#include ++#include ++#include + + // Define custom keys + static ZBX_METRIC keys[] = diff --git a/databases/zabbix34-libzbxpgsql/pkg-descr b/databases/zabbix34-libzbxpgsql/pkg-descr new file mode 100644 index 000000000000..0b6a261aae10 --- /dev/null +++ b/databases/zabbix34-libzbxpgsql/pkg-descr @@ -0,0 +1,7 @@ +This project provides comprehensive monitoring of PostgreSQL servers using a +natively compiled Zabbix agent module, written in C. + +The module enables discovery and monitoring of tablespaces, databases, +namespaces, tables, indexes, etc. + +WWW: http://cavaliercoder.com/libzbxpgsql/ diff --git a/databases/zabbix34-libzbxpgsql/pkg-message b/databases/zabbix34-libzbxpgsql/pkg-message new file mode 100644 index 000000000000..23d85feb7007 --- /dev/null +++ b/databases/zabbix34-libzbxpgsql/pkg-message @@ -0,0 +1,3 @@ +In order to enable the module, add libzbxpgsql.so to the LoadModule= +line in zabbix_agentd.conf and restart the agent with +service zabbix_agentd restart diff --git a/databases/zabbix34-libzbxpgsql/pkg-plist b/databases/zabbix34-libzbxpgsql/pkg-plist new file mode 100644 index 000000000000..765ec35e2459 --- /dev/null +++ b/databases/zabbix34-libzbxpgsql/pkg-plist @@ -0,0 +1,4 @@ +lib/libzbxpgsql.so +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Template_PostgreSQL_Server_2.0.xml +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Template_PostgreSQL_Server_2.4.xml +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Template_PostgreSQL_Server_3.0.xml