Import ports/net/nagios/nsca-ng, a nicer BSD-licensed alternative to the

horrible Nagios NSCA passive check acceptor. Command lines are compatible
but the protocol is not - however the two servers can coexist to assist
during a migration.  Fix/ok rpe@
This commit is contained in:
sthen 2013-03-11 19:27:31 +00:00
parent 2338ddac5f
commit 8150e5250b
8 changed files with 144 additions and 0 deletions

View File

@ -0,0 +1,43 @@
# $OpenBSD: Makefile,v 1.1.1.1 2013/03/11 19:27:31 sthen Exp $
COMMENT-main= server to accept passive check results for Nagios/Icinga
COMMENT-client= client to send passive check results to Nagios/Icinga
V= 1.0
DISTNAME= nsca-ng-$V
PKGNAME-main= nsca-ng-$V
PKGNAME-client= nsca-ng-client-$V
CATEGORIES= net
HOMEPAGE= https://www.nsca-ng.org/
MAINTAINER= Stuart Henderson <sthen@openbsd.org>
# BSD
PERMIT_PACKAGE_CDROM= Yes
WANTLIB= c crypto ev ssl
WANTLIB-main= ${WANTLIB} confuse
MASTER_SITES= https://www.nsca-ng.org/download/
LIB_DEPENDS= devel/libev
LIB_DEPENDS-main= ${LIB_DEPENDS} \
devel/libconfuse
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= --enable-server
MULTI_PACKAGES= -main -client
RUN_DEPENDS-main= icinga-*|nagios-*:net/nagios/nagios
FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/nsca-ng
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/libexec/nagios/
cd ${WRKSRC}/contrib; ${INSTALL_DATA} README acknowledge debug_server \
disable_notifications downtime enable_notifications invoke_check \
${PREFIX}/share/examples/nsca-ng/
ln -s ${TRUEPREFIX}/sbin/send_nsca ${PREFIX}/libexec/nagios/send_nsca
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (nsca-ng-1.0.tar.gz) = I5OT9NlLlfP4QV4pAHt5BswnH4FPtaJqK7cnpWL2ySs=
SIZE (nsca-ng-1.0.tar.gz) = 300633

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-etc_nsca-ng_cfg,v 1.1.1.1 2013/03/11 19:27:31 sthen Exp $
--- etc/nsca-ng.cfg.orig Mon Mar 11 14:39:05 2013
+++ etc/nsca-ng.cfg Mon Mar 11 16:20:48 2013
@@ -8,7 +8,8 @@
#
# 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 = "/var/nagios/rw/nagios.cmd"
+# command_file = "/var/icinga/rw/icinga.cmd"
#
# These configuration settings are optional.
@@ -17,7 +18,8 @@ command_file = "/usr/local/nagios/var/rw/nagios.cmd"
# pid_file = "/var/run/nsca-ng.pid" # Default: create no PID file.
# temp_directory = "/dev/shm" # Default: "/tmp".
# tls_ciphers = "PSK-AES256-CBC-SHA" # Default: see nsca-ng.cfg(5).
-# user = "nagios" # Default: don't switch user.
+# user = "_nagios" # Default: don't switch user.
+# user = "_icinga" # Alternative for Icinga.
# log_level = 2 # Default: 3.
# max_command_size = 65536 # Default: 16384.
# max_queue_size = 128 # Default: 1024.

View File

@ -0,0 +1,15 @@
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 client ("send_nsca"), which accepts
all input, command line arguments, and configuration files accepted
by the send_nsca binary provided with the original NSCA package.
NSCA clients cannot talk to NSCA-ng servers (nor vice versa), but NSCA
and NSCA-ng servers can happily run side by side.

View File

@ -0,0 +1,17 @@
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.

View File

@ -0,0 +1,13 @@
@comment $OpenBSD: PLIST-client,v 1.1.1.1 2013/03/11 19:27:31 sthen Exp $
@conflict nsca-client-*
libexec/nagios/
libexec/nagios/send_nsca
@man man/man5/send_nsca.cfg.5
@man man/man8/send_nsca.8
@bin sbin/send_nsca
share/examples/nsca-ng/
share/examples/nsca-ng/send_nsca.cfg
@owner root
@group wheel
@mode 750
@sample ${SYSCONFDIR}/send_nsca.cfg

View File

@ -0,0 +1,21 @@
@comment $OpenBSD: PLIST-main,v 1.1.1.1 2013/03/11 19:27:31 sthen Exp $
@man man/man5/nsca-ng.cfg.5
@man man/man8/nsca-ng.8
@bin sbin/nsca-ng
share/examples/nsca-ng/
share/examples/nsca-ng/README
share/examples/nsca-ng/acknowledge
share/examples/nsca-ng/debug_server
share/examples/nsca-ng/disable_notifications
share/examples/nsca-ng/downtime
share/examples/nsca-ng/enable_notifications
share/examples/nsca-ng/invoke_check
share/examples/nsca-ng/nsca-ng.cfg
@owner root
@group wheel
@mode 750
@sample ${SYSCONFDIR}/nsca-ng.cfg
@mode
@group
@owner
@rcscript ${RCDIR}/nsca_ng

View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# $OpenBSD: nsca_ng.rc,v 1.1.1.1 2013/03/11 19:27:31 sthen Exp $
daemon="${TRUEPREFIX}/sbin/nsca-ng"
daemon_flags="-c ${SYSCONFDIR}/nsca-ng.cfg"
. /etc/rc.d/rc.subr
rc_cmd $1