Date: Thu, 23 Apr 2015 15:37:59 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r384593 - in head/net-mgmt: . nsca-ng nsca-ng-client nsca-ng/files Message-ID: <201504231537.t3NFbxsG032991@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Thu Apr 23 15:37:59 2015 New Revision: 384593 URL: https://svnweb.freebsd.org/changeset/ports/384593 Log: Add net-mgmt/nsca-ng and net-mgmt/nsca-ng-client, client-server pair which makes the Nagios command file accessible to remote systems. PR: 188938 Submitted by root peng spline inf fu-berlin de Sponsored by: Absolight Added: head/net-mgmt/nsca-ng/ head/net-mgmt/nsca-ng-client/ head/net-mgmt/nsca-ng-client/Makefile (contents, props changed) head/net-mgmt/nsca-ng-client/pkg-plist (contents, props changed) head/net-mgmt/nsca-ng/Makefile (contents, props changed) head/net-mgmt/nsca-ng/distinfo (contents, props changed) head/net-mgmt/nsca-ng/files/ head/net-mgmt/nsca-ng/files/nsca-ng.in (contents, props changed) head/net-mgmt/nsca-ng/files/patch-src_server_nsca-ng.c (contents, props changed) head/net-mgmt/nsca-ng/pkg-descr (contents, props changed) head/net-mgmt/nsca-ng/pkg-plist (contents, props changed) Modified: head/net-mgmt/Makefile Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Thu Apr 23 15:27:14 2015 (r384592) +++ head/net-mgmt/Makefile Thu Apr 23 15:37:59 2015 (r384593) @@ -173,6 +173,8 @@ SUBDIR += nrpe-ssl SUBDIR += nsca SUBDIR += nsca-client + SUBDIR += nsca-ng + SUBDIR += nsca-ng-client SUBDIR += nsca27 SUBDIR += nsca27-client SUBDIR += nstreams Added: head/net-mgmt/nsca-ng-client/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nsca-ng-client/Makefile Thu Apr 23 15:37:59 2015 (r384593) @@ -0,0 +1,15 @@ +# Created by: Alexander Sulfrian <alexander@sulfrian.net> +# $FreeBSD$ + +PKGNAMESUFFIX= -client + +CONFLICTS= nsca-client-2.* nsca27-client-2.* +PLIST= ${.CURDIR}/pkg-plist + +DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}${PKGNAMESUFFIX} +PORTEXAMPLES= README acknowledge debug_server disable_notifications \ + downtime enable_notifications invoke_check + +MASTERDIR= ${.CURDIR}/../nsca-ng + +.include "${MASTERDIR}/Makefile" Added: head/net-mgmt/nsca-ng-client/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nsca-ng-client/pkg-plist Thu Apr 23 15:37:59 2015 (r384593) @@ -0,0 +1,5 @@ +@sample etc/send_nsca.cfg.sample +libexec/nagios/send_nsca +man/man5/send_nsca.cfg.5.gz +man/man8/send_nsca.8.gz +sbin/send_nsca Added: head/net-mgmt/nsca-ng/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nsca-ng/Makefile Thu Apr 23 15:37:59 2015 (r384593) @@ -0,0 +1,56 @@ +# Created by: Alexander Sulfrian <alexander@sulfrian.net> +# $FreeBSD$ + +PORTNAME= nsca-ng +PORTVERSION= 1.2 +CATEGORIES= net-mgmt +MASTER_SITES= https://www.nsca-ng.org/download/ http://www.nsca-ng.org/download/ + +MAINTAINER= alexander@sulfrian.net +COMMENT= Nagios Service Check Acceptor + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/COPYING + +LIB_DEPENDS= libev.so:${PORTSDIR}/devel/libev + +.if !defined(PKGNAMESUFFIX) +LIB_DEPENDS+= libconfuse.so:${PORTSDIR}/devel/libconfuse +.endif + +CONFLICTS?= nsca-2.* nsca27-2.* + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --localstatedir=/var/spool/nagios +USE_OPENSSL= yes + +.if !defined(PKGNAMESUFFIX) +USE_RC_SUBR= nsca-ng +CONFIGURE_ARGS+= --enable-server +.endif + +PORTDOCS= NEWS COPYING README PROTOCOL TODO + +post-install: +.if defined(PKGNAMESUFFIX) + ${INSTALL_DATA} -d ${STAGEDIR}${PREFIX}/libexec/nagios/ + ${LN} -s ${PREFIX}/sbin/send_nsca ${STAGEDIR}${PREFIX}/libexec/nagios/send_nsca + + ${INSTALL_DATA} -d ${STAGEDIR}${EXAMPLESDIR} + cd ${WRKSRC}/contrib && ${INSTALL_DATA} ${PORTEXAMPLES} \ + ${STAGEDIR}${EXAMPLESDIR} + + cd ${STAGEDIR}${PREFIX}/etc && ${MV} send_nsca.cfg send_nsca.cfg.sample + # remove files not used here + cd ${STAGEDIR}${PREFIX} && ${RM} man/man8/nsca-ng.8 man/man5/nsca-ng.cfg.5 +.else + cd ${STAGEDIR}${PREFIX}/etc && ${MV} nsca-ng.cfg nsca-ng.cfg.sample + # remove files not used here + cd ${STAGEDIR}${PREFIX} && ${RM} etc/send_nsca.cfg man/man5/send_nsca.cfg.5 \ + man/man8/send_nsca.8 sbin/send_nsca +.endif + + @${MKDIR} ${STAGEDIR}${DOCSDIR} + cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR} + +.include <bsd.port.mk> Added: head/net-mgmt/nsca-ng/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nsca-ng/distinfo Thu Apr 23 15:37:59 2015 (r384593) @@ -0,0 +1,2 @@ +SHA256 (nsca-ng-1.2.tar.gz) = fd0edf7a3c4da46aff5321bf005c68853dad5bae0b889e5e42336e85cb7a24e7 +SIZE (nsca-ng-1.2.tar.gz) = 327702 Added: head/net-mgmt/nsca-ng/files/nsca-ng.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nsca-ng/files/nsca-ng.in Thu Apr 23 15:37:59 2015 (r384593) @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: nsca-ng +# REQUIRE: nagios icinga +# BEFORE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable nsca-ng: +# nsca_ng_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable nsca-ng. +# nsca_ng_flags (str): Empty by default. +# nsca_ng_configfile (str): Set to "%%PREFIX%%/etc/nsca-ng.cfg" by default. +# + +. /etc/rc.subr + +name=nsca_ng +desc="Nagios Service Check Acceptor" +rcvar=nsca_ng_enable + +load_rc_config "${name}" + +command="%%PREFIX%%/sbin/nsca-ng" +pidfile="/var/run/${name}.pid" +extra_commands=reload + +nsca_ng_enable=${nsca_ng_enable:-"NO"} +nsca_ng_configfile=${nsca_ng_configfile:-"%%PREFIX%%/etc/nsca-ng.cfg"} + +required_files="${nsca_ng_configfile}" +command_args="-c ${nsca_ng_configfile} -P ${pidfile}" + +run_rc_command "$1" Added: head/net-mgmt/nsca-ng/files/patch-src_server_nsca-ng.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nsca-ng/files/patch-src_server_nsca-ng.c Thu Apr 23 15:37:59 2015 (r384593) @@ -0,0 +1,16 @@ +--- src/server/nsca-ng.c.orig 2013-11-06 21:44:18 UTC ++++ src/server/nsca-ng.c +@@ -300,11 +300,9 @@ close_descriptors(void) + int min_fd = STDERR_FILENO + 1; + + #if HAVE_CLOSEFROM /* BSD and Solaris. */ +- if (closefrom(min_fd) == -1) +- die("Cannot close file descriptors >= %d: %m", min_fd); ++ (void)closefrom(min_fd); + #elif defined(F_CLOSEM) /* AIX and IRIX. */ +- if (fcntl(min_fd, F_CLOSEM, 0) == -1) +- die("Cannot close file descriptors >= %d: %m", min_fd); ++ (void)fcntl(min_fd, F_CLOSEM, 0); + #else + int max_fd = MIN(sysconf(_SC_OPEN_MAX), /* Arbitrary limit: */ 1048576); + int fd; Added: head/net-mgmt/nsca-ng/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nsca-ng/pkg-descr Thu Apr 23 15:37:59 2015 (r384593) @@ -0,0 +1,19 @@ +NSCA-ng provides a client-server pair which 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. 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. +NSCA-ng uses TLS encryption and shared-secret authentication with +per-client passwords, as well as fine-grained authorization control. + +This package contains the NSCA-ng server, which is written in C and +uses an event-driven architecture. Disk I/O is avoided unless the data +cannot be submitted in one go due to its size (on Linux, the threshold +is 4kB). In this case, the data is handed over to Nagios via +asynchronously written files. + +NSCA clients cannot talk to NSCA-ng servers (nor vice versa), but NSCA +and NSCA-ng servers can happily run side by side. + +WWW: http://www.nsca-ng.org/ Added: head/net-mgmt/nsca-ng/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/nsca-ng/pkg-plist Thu Apr 23 15:37:59 2015 (r384593) @@ -0,0 +1,4 @@ +@sample etc/nsca-ng.cfg.sample +man/man5/nsca-ng.cfg.5.gz +man/man8/nsca-ng.8.gz +sbin/nsca-ng
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504231537.t3NFbxsG032991>