summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2019-09-07 16:25:53 +0000
committermaya <maya@pkgsrc.org>2019-09-07 16:25:53 +0000
commit8f60588a3ee83ce2658c02baa319426ee24f5021 (patch)
tree6acb3844882d751036e74c445c59ce2ff4ac48d0 /net
parent9c25cede77182efb490855a121c44d7fb99a01f2 (diff)
downloadpkgsrc-8f60588a3ee83ce2658c02baa319426ee24f5021.tar.gz
Add nsca-ng version 1.4
The NSCA-ng package provides a client-server pair that makes the Nagios command file accessible to remote systems. This allows for submitting passive check results, downtimes, and many other commands to Nagios or compatible monitoring solutions. It can also be used for implementing distributed setups. The submitted data is queued by the NSCA-ng server if Nagios goes down. Multiple check results or commands can be submitted in one go, and multiline plugin output is fully supported. From Timo Buhrmester in PR pkg/51407 PR pkg/51406 My changes: fixed pkglint warnings (didn't run 'make distinfo'), unified the server and client packages because they installed extra man pages for me, and patched for building with OpenSSL 1.1.1. I had to get the distfile from another place because the website hosting this package is currently down.
Diffstat (limited to 'net')
-rw-r--r--net/nsca-ng/DESCR8
-rw-r--r--net/nsca-ng/Makefile36
-rw-r--r--net/nsca-ng/PLIST9
-rw-r--r--net/nsca-ng/distinfo8
-rw-r--r--net/nsca-ng/patches/patch-etc_nsca-ng.cfg18
-rw-r--r--net/nsca-ng/patches/patch-src_common_tls.c19
-rw-r--r--net/nsca-ng/patches/patch-src_common_tls.c.orig0
7 files changed, 98 insertions, 0 deletions
diff --git a/net/nsca-ng/DESCR b/net/nsca-ng/DESCR
new file mode 100644
index 00000000000..bba871eaaff
--- /dev/null
+++ b/net/nsca-ng/DESCR
@@ -0,0 +1,8 @@
+The NSCA-ng package provides a client-server pair that makes the Nagios
+command file accessible to remote systems. This allows for submitting
+passive check results, downtimes, and many other commands to Nagios or
+compatible monitoring solutions.
+It can also be used for implementing distributed setups. The submitted
+data is queued by the NSCA-ng server if Nagios goes down. Multiple check
+results or commands can be submitted in one go, and multiline plugin
+output is fully supported.
diff --git a/net/nsca-ng/Makefile b/net/nsca-ng/Makefile
new file mode 100644
index 00000000000..0a21ed4aed7
--- /dev/null
+++ b/net/nsca-ng/Makefile
@@ -0,0 +1,36 @@
+# $NetBSD: Makefile,v 1.1 2019/09/07 16:25:53 maya Exp $
+
+VER= 1.4
+DISTNAME= nsca-ng-${VER}
+CATEGORIES= net
+MASTER_SITES= http://www.nsca-ng.org/download/
+
+MAINTAINER= timo@math.uni-bonn.de
+HOMEPAGE= https://www.nsca-ng.org/download/
+COMMENT= Send/accept passive check results to/from nagios
+LICENSE= 2-clause-bsd
+
+SUBST_CLASSES+= config
+SUBST_MESSAGE.config= Adjust variables: VARBASE (in nsca-ng.cfg)
+SUBST_FILES.config+= etc/nsca-ng.cfg
+SUBST_STAGE.config= pre-configure
+SUBST_VARS.config= VARBASE
+
+RCD_SCRIPTS= nsca_ng_server
+RCD_SCRIPT_SRC.nsca_ng_server= files/nsca-ng-server.sh
+
+EGDIR= ${PREFIX}/share/examples/nsca-ng
+CONF_FILES= ${EGDIR}/nsca-ng.cfg ${PKG_SYSCONFDIR}/nsca-ng.cfg
+
+INSTALLATION_DIRS+= ${EGDIR}
+INSTALL_MAKE_FLAGS+= sysconfdir=${EGDIR}
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} --enable-server=yes --enable-client=yes --localstatedir=/var/spool
+
+# Not available in OpenSSL 1.1.x
+CONFIGURE_ENV+= ac_cv_lib_ssl_SSL_library_init=yes
+
+.include "../../security/openssl/buildlink3.mk"
+.include "../../devel/confuse/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/nsca-ng/PLIST b/net/nsca-ng/PLIST
new file mode 100644
index 00000000000..7b3db335f74
--- /dev/null
+++ b/net/nsca-ng/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2019/09/07 16:25:53 maya Exp $
+man/man5/nsca-ng.cfg.5
+man/man5/send_nsca.cfg.5
+man/man8/nsca-ng.8
+man/man8/send_nsca.8
+sbin/nsca-ng
+sbin/send_nsca
+share/examples/nsca-ng/nsca-ng.cfg
+share/examples/nsca-ng/send_nsca.cfg
diff --git a/net/nsca-ng/distinfo b/net/nsca-ng/distinfo
new file mode 100644
index 00000000000..f5fbe14568c
--- /dev/null
+++ b/net/nsca-ng/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2019/09/07 16:25:53 maya Exp $
+
+SHA1 (nsca-ng-1.4.tar.gz) = 5b8423d14d1bab2dc87605694f828363a1e671e4
+RMD160 (nsca-ng-1.4.tar.gz) = 17fa9aaff47f1790aaae090a9fdea4955b85c4e2
+SHA512 (nsca-ng-1.4.tar.gz) = 79b52fb2e5a7f1523958a24846ac15826738a28454e6e2c9e20dda2202b99fce042d0733ac8dfc98619210312af8eff748c22f82208528f54243061054273c41
+Size (nsca-ng-1.4.tar.gz) = 354012 bytes
+SHA1 (patch-etc_nsca-ng.cfg) = 54e67b420d4905c3c7a8d1fe2268bc787b5ed6f3
+SHA1 (patch-src_common_tls.c) = 30d5a28225bd8f0c1b8222c977490410fd1531a0
diff --git a/net/nsca-ng/patches/patch-etc_nsca-ng.cfg b/net/nsca-ng/patches/patch-etc_nsca-ng.cfg
new file mode 100644
index 00000000000..3116aa6437c
--- /dev/null
+++ b/net/nsca-ng/patches/patch-etc_nsca-ng.cfg
@@ -0,0 +1,18 @@
+$NetBSD: patch-etc_nsca-ng.cfg,v 1.1 2019/09/07 16:25:53 maya Exp $
+
+=============================================================================
+This patch fixes a hardcoded path name in the config
+=============================================================================
+
+
+--- etc/nsca-ng.cfg.orig 2016-03-01 13:47:35.000000000 +0100
++++ etc/nsca-ng.cfg 2016-03-01 13:48:09.000000000 +0100
+@@ -8,7 +8,7 @@
+ #
+ # Most probably, you'll have to specify the path to the Nagios command file.
+ #
+-command_file = "/usr/local/nagios/var/rw/nagios.cmd"
++command_file = "@VARBASE@/spool/nagios/rw/nagios.cmd"
+
+ #
+ # These configuration settings are optional.
diff --git a/net/nsca-ng/patches/patch-src_common_tls.c b/net/nsca-ng/patches/patch-src_common_tls.c
new file mode 100644
index 00000000000..40389efa9a9
--- /dev/null
+++ b/net/nsca-ng/patches/patch-src_common_tls.c
@@ -0,0 +1,19 @@
+$NetBSD: patch-src_common_tls.c,v 1.1 2019/09/07 16:25:53 maya Exp $
+
+OpenSSL 1.1.x support.
+Newer OpenSSL will do atexit(OPENSSL_cleanup) by default.
+
+--- src/common/tls.c.orig 2014-07-15 12:07:02.000000000 +0000
++++ src/common/tls.c
+@@ -419,7 +419,11 @@ initialize_openssl(const SSL_METHOD *met
+
+ (void)SSL_library_init();
+ SSL_load_error_strings();
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ (void)atexit(ERR_free_strings);
++#else
++ (void)atexit(OPENSSL_cleanup);
++#endif
+
+ /*
+ * In earlier versions, we called
diff --git a/net/nsca-ng/patches/patch-src_common_tls.c.orig b/net/nsca-ng/patches/patch-src_common_tls.c.orig
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/net/nsca-ng/patches/patch-src_common_tls.c.orig