aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/librenms-agent
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2017-05-06 15:25:03 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2017-05-06 15:25:03 +0000
commit09068645c27f014d6127fac96d6d80c2c2bf932b (patch)
treedda299fdc763e9675f216ed93229c3ecf4758b14 /net-mgmt/librenms-agent
parentdb3bbd7e19a8e8ed06751fdf645fa0409ddbb0fb (diff)
downloadports-09068645c27f014d6127fac96d6d80c2c2bf932b.tar.gz
ports-09068645c27f014d6127fac96d6d80c2c2bf932b.zip
Notes
Diffstat (limited to 'net-mgmt/librenms-agent')
-rw-r--r--net-mgmt/librenms-agent/Makefile49
-rw-r--r--net-mgmt/librenms-agent/distinfo3
-rw-r--r--net-mgmt/librenms-agent/files/patch-check__mk__agent__freebsd13
-rw-r--r--net-mgmt/librenms-agent/files/patch-check__mk__xinetd11
-rw-r--r--net-mgmt/librenms-agent/files/patch-mk__enplug13
-rw-r--r--net-mgmt/librenms-agent/pkg-descr4
-rw-r--r--net-mgmt/librenms-agent/pkg-plist25
7 files changed, 118 insertions, 0 deletions
diff --git a/net-mgmt/librenms-agent/Makefile b/net-mgmt/librenms-agent/Makefile
new file mode 100644
index 000000000000..8978895b8971
--- /dev/null
+++ b/net-mgmt/librenms-agent/Makefile
@@ -0,0 +1,49 @@
+# Created by: Nicolas Goralski <nicolas@goralski.fr>
+# $FreeBSD$
+
+PORTNAME= librenms-agent
+PORTVERSION= 0.3
+CATEGORIES= net-mgmt
+
+MAINTAINER= kiwi@oav.net
+COMMENT= Agents and plugins for librenms
+
+LICENSE= GPLv2
+
+USES= shebangfix python:2:run php:cli
+NO_ARCH= yes
+
+USE_GITHUB= yes
+GH_ACCOUNT= librenms
+GH_TAGNAME= fb678cb
+
+NO_BUILD= yes
+
+SHEBANG_FILES= agent-local/*
+
+RUN_DEPENDS+= xinetd:security/xinetd \
+ bash:shells/bash
+
+LIB_DEPENDS+= libstatgrab.so:devel/libstatgrab \
+
+post-patch:
+ @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/check_mk_agent_freebsd
+ @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/mk_enplug
+ @${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/check_mk_xinetd
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/xinetd.d
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/check_mk_agent/plugins
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/check_mk_agent/repo
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/check_mk_agent/local
+ ${INSTALL_SCRIPT} ${WRKSRC}/check_mk_agent_freebsd ${STAGEDIR}${PREFIX}/bin/check_mk_agent
+ ${INSTALL_SCRIPT} ${WRKSRC}/mk_enplug ${STAGEDIR}${PREFIX}/bin/
+ ${INSTALL_SCRIPT} ${WRKSRC}/check_mk_xinetd ${STAGEDIR}${PREFIX}/etc/xinetd.d/check_mk
+ ${INSTALL_SCRIPT} ${WRKSRC}/snmp/distro ${STAGEDIR}${PREFIX}/bin
+
+ @cd ${WRKSRC} ; \
+ for agent_local in $$( ${FIND} ./agent-local -type f ! -name README ); do \
+ ${INSTALL_SCRIPT} "$$agent_local" ${STAGEDIR}${PREFIX}/lib/check_mk_agent/repo/ ; \
+ done
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/librenms-agent/distinfo b/net-mgmt/librenms-agent/distinfo
new file mode 100644
index 000000000000..9adfd88ef6cf
--- /dev/null
+++ b/net-mgmt/librenms-agent/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1494084135
+SHA256 (librenms-librenms-agent-0.3-fb678cb_GH0.tar.gz) = 647aa31ceb32a6df3300244ab4b454c9dbcd940cefb2b46b349761e5e17abdbc
+SIZE (librenms-librenms-agent-0.3-fb678cb_GH0.tar.gz) = 42887
diff --git a/net-mgmt/librenms-agent/files/patch-check__mk__agent__freebsd b/net-mgmt/librenms-agent/files/patch-check__mk__agent__freebsd
new file mode 100644
index 000000000000..fbe74c9d3bca
--- /dev/null
+++ b/net-mgmt/librenms-agent/files/patch-check__mk__agent__freebsd
@@ -0,0 +1,13 @@
+--- check_mk_agent_freebsd.orig 2016-08-01 16:26:27 UTC
++++ check_mk_agent_freebsd
+@@ -40,8 +40,8 @@
+ export LC_ALL=C
+ unset LANG
+
+-export MK_LIBDIR="/usr/local/lib/check_mk_agent"
+-export MK_CONFDIR="/etc/check_mk"
++export MK_LIBDIR="%%PREFIX%%/lib/check_mk_agent"
++export MK_CONFDIR="%%PREFIX%%/etc/check_mk"
+ export MK_TMPDIR="/var/run/check_mk"
+
+
diff --git a/net-mgmt/librenms-agent/files/patch-check__mk__xinetd b/net-mgmt/librenms-agent/files/patch-check__mk__xinetd
new file mode 100644
index 000000000000..6b016587bc26
--- /dev/null
+++ b/net-mgmt/librenms-agent/files/patch-check__mk__xinetd
@@ -0,0 +1,11 @@
+--- check_mk_xinetd.orig 2016-08-01 16:26:27 UTC
++++ check_mk_xinetd
+@@ -30,7 +30,7 @@ service check_mk
+ protocol = tcp
+ wait = no
+ user = root
+- server = /usr/bin/check_mk_agent
++ server = %%PREFIX%%/bin/check_mk_agent
+
+ # If you use fully redundant monitoring and poll the client
+ # from more then one monitoring servers in parallel you might
diff --git a/net-mgmt/librenms-agent/files/patch-mk__enplug b/net-mgmt/librenms-agent/files/patch-mk__enplug
new file mode 100644
index 000000000000..13c71e183c85
--- /dev/null
+++ b/net-mgmt/librenms-agent/files/patch-mk__enplug
@@ -0,0 +1,13 @@
+--- mk_enplug.orig 2016-08-01 16:26:27 UTC
++++ mk_enplug
+@@ -14,8 +14,8 @@
+ #
+ # See http://www.gnu.org/licenses/gpl.txt for the full license
+
+-plugdir=/usr/lib/check_mk_agent/plugins
+-repodir=/usr/lib/check_mk_agent/repo
++plugdir=%%PREFIX%%/lib/check_mk_agent/plugins
++repodir=%%PREFIX%%/lib/check_mk_agent/repo
+
+ findscripts() {
+ find ${repodir} -type f | sed -e "s#$repodir/##g"
diff --git a/net-mgmt/librenms-agent/pkg-descr b/net-mgmt/librenms-agent/pkg-descr
new file mode 100644
index 000000000000..7f3db8149a29
--- /dev/null
+++ b/net-mgmt/librenms-agent/pkg-descr
@@ -0,0 +1,4 @@
+librenms-agent is an agent based on check_mk used with xinetd to provide
+monitoring informations of machine to librenms server.
+
+WWW: https://github.com/librenms/librenms-agent
diff --git a/net-mgmt/librenms-agent/pkg-plist b/net-mgmt/librenms-agent/pkg-plist
new file mode 100644
index 000000000000..61fb3f83ad4b
--- /dev/null
+++ b/net-mgmt/librenms-agent/pkg-plist
@@ -0,0 +1,25 @@
+bin/check_mk_agent
+bin/distro
+bin/mk_enplug
+etc/xinetd.d/check_mk
+lib/check_mk_agent/repo/apache
+lib/check_mk_agent/repo/bind
+lib/check_mk_agent/repo/ceph
+lib/check_mk_agent/repo/dmi
+lib/check_mk_agent/repo/dpkg
+lib/check_mk_agent/repo/drbd
+lib/check_mk_agent/repo/hddtemp
+lib/check_mk_agent/repo/memcached
+lib/check_mk_agent/repo/munin
+lib/check_mk_agent/repo/mysql
+lib/check_mk_agent/repo/nfsstats
+lib/check_mk_agent/repo/nginx
+lib/check_mk_agent/repo/powerdns
+lib/check_mk_agent/repo/powerdns-recursor
+lib/check_mk_agent/repo/proxmox
+lib/check_mk_agent/repo/rpm
+lib/check_mk_agent/repo/rrdcached
+lib/check_mk_agent/repo/temperature
+lib/check_mk_agent/repo/tinydns
+@dir lib/check_mk_agent/local
+@dir lib/check_mk_agent/plugins