debian/0000755000000000000000000000000012236627257007202 5ustar debian/nsca-ng-client.manpages0000644000000000000000000000005012121042561013472 0ustar man/send_nsca.man man/send_nsca.cfg.man debian/nsca-ng-server.init0000644000000000000000000000600312121042561012676 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: nsca-ng # Required-Start: $remote_fs $network $syslog # Required-Stop: $remote_fs $network $syslog # Should-Start: $named nagios3 icinga # Should-Stop: $named nagios3 icinga # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Accept monitoring commands # Description: The NSCA-ng server makes the Nagios command file accessible # from remote systems. This allows for submitting passive # check results, downtimes, and many other commands to Nagios # or Icinga. ### END INIT INFO PATH='/sbin:/usr/sbin:/bin:/usr/bin' NAME='nsca-ng' DESC='monitoring command acceptor' DAEMON="/usr/sbin/$NAME" PIDDIR="/var/run/nsca-ng/" PIDFILE="$PIDDIR/nsca-ng.pid" CFGFILE="/etc/nsca-ng/nsca-ng.cfg" # Exit if the package is not installed. [ -x "$DAEMON" ] || exit 0 # Read configuration variable file if it is present. [ -r "/etc/default/${NAME}-server" ] && . "/etc/default/${NAME}-server" # Define LSB log_* functions. . '/lib/lsb/init-functions' # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh if [ "${NSCA_NG}" != "yes" ]; then log_warning_msg "Not starting nsca-ng - edit /etc/default/nsca-ng-server to enable it" exit 0 fi if [ -r "$CFGFILE" ] then : ${DAEMONUSER:="$(sed -r -n "s/^[[:blank:]]*user[[:blank:]]*=[[:blank:]]*[\"']?([^\"'#[:blank:]]+).*/\1/p" "$CFGFILE")"} else log_failure_msg "Please configure user in nsca-ng.cfg, running nsca-ng.cfg is not recommended" exit 1 fi # Check whether that user actually exists. if ! getent passwd "$DAEMONUSER" >'/dev/null' then log_failure_msg "Configured user \"$DAEMONUSER\" doesn't exist, aborting." exit 1 fi # Create PID directory and hand it over to the $DAEMONUSER. if [ ! -d "$PIDDIR" ] then mkdir -p "$PIDDIR" chown "$DAEMONUSER:$DAEMONUSER" "$PIDDIR" fi # Set the default command line arguments. : ${DAEMONARGS:="-P $PIDFILE -c $CFGFILE -s"} DAEMONCTL="start-stop-daemon --quiet --pidfile $PIDFILE --exec $DAEMON" check_started() { if ! start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null then return 0 #is started else return 1 #isn't started fi } status() { log_action_begin_msg "checking $DAEMON" if check_started; then log_action_end_msg 0 "running" else if [ -e "$PIDFILE" ]; then log_action_end_msg 1 "$DAEMON failed" exit 1 else log_action_end_msg 1 "not running" exit 3 fi fi } case $1 in start) log_daemon_msg "Starting $DESC" "$NAME" if ! check_started then $DAEMONCTL --start -- $DAEMONARGS fi log_end_msg $? ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" $DAEMONCTL --stop --retry 'TERM/30/KILL/5' log_end_msg $? ;; restart) "$0" 'stop' && sleep 1 && "$0" 'start' ;; reload|force-reload) log_daemon_msg "Reloading $DESC" "$NAME" $DAEMONCTL --stop --signal 1 log_end_msg $? ;; status) status ;; *) echo >&2 "Usage: $0 {start|stop|status|restart|reload|force-reload}" exit 3 ;; esac : debian/compat0000644000000000000000000000000212121042561010356 0ustar 9 debian/nsca-ng-server.manpages0000644000000000000000000000004412121042561013525 0ustar man/nsca-ng.man man/nsca-ng.cfg.man debian/nsca-ng-server.install0000644000000000000000000000012212121042561013375 0ustar debian/nsca-ng.local.cfg etc/nsca-ng etc/nsca-ng.cfg etc/nsca-ng usr/sbin/nsca-ng debian/nsca-ng-server.postinst0000644000000000000000000000176112132167731013635 0ustar #!/bin/bash set -e setperm() { local user="$1" local group="$2" local mode="$3" local file="$4" shift 4 # only do something when no setting exists if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then chown "$user":"$group" "$file" chmod "$mode" "$file" fi } case "$1" in configure) if ! getent passwd nagios > /dev/null ; then echo 'Adding system-user for nagios' 1>&2 adduser --system --group --home /var/lib/nagios \ --disabled-login --force-badname nagios > /dev/null fi # explicitly set some permissions setperm root root 0600 /etc/nsca-ng/nsca-ng.cfg test -d /var/run/nsca-ng || mkdir /var/run/nsca-ng setperm nagios nagios 0700 /var/run/nsca-ng ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \$1'" >&2 exit 1 ;; esac #DEBHELPER# debian/copyright0000644000000000000000000000545112121042561011120 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: nsca-ng Source: http://nsca-ng.org Files: * Copyright: Copyright 2013 Holger Weiss License: BSD-2-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: debian/* Copyright: 2013 Alexander Wirt License: BSD-2-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/README.Debian0000644000000000000000000000140212121042561011216 0ustar Welcome to the nsca-ng package for Debian GNU/Linux! You can contact the nsca-ng maintainers at: pkg-nagios-devel@lists.alioth.debian.org Enabling the daemon ------------------- To enable the daemon set NSCA-NG in /etc/default/nsca-ng-server to "yes". Using nsca-ng ------------- If you want to use nsca-ng with Icinga just comment out the "command_file" for nagios3 and enable the prepared "command_file" for icinga. If you are missing your command socket it is a good idea to read either /usr/share/doc/nagios3/README.Debian or /usr/share/doc/icinga/README.Debian (the "External Commands" paragraph). The daemon is bound to localhost by default, you probably want to change this in "/etc/nsca-ng/nsca-ng.local.cfg" when you are done with your configuration. debian/source/0000755000000000000000000000000012121042561010460 5ustar debian/source/format0000644000000000000000000000001412121042561011666 0ustar 3.0 (quilt) debian/control0000644000000000000000000000240712121042561010566 0ustar Source: nsca-ng Section: net Priority: extra Maintainer: Alexander Wirt Build-Depends: autotools-dev, debhelper (>= 9), libconfuse-dev, libev-dev, libbsd-dev, libssl-dev Standards-Version: 3.9.3 Homepage: http://www.nsca-ng.org/ Package: nsca-ng-client Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Conflicts: nsca (<< 2.9.1-1), nsca-client Description: Send monitoring commands to NSCA-ng server The send_nsca utility transmits one or more check results or monitoring commands to an NSCA-ng server. . The communication with the server is TLS encrypted and authenticated using pre-shared keys. Package: nsca-ng-server Architecture: any Section: net Depends: adduser, ${misc:Depends}, ${shlibs:Depends} Recommends: nagios3 | icinga Description: Monitoring command acceptor The NSCA-ng server makes the Nagios command file accessible from remote systems. This allows for submitting passive check results, downtimes, and many other commands to Nagios or Icinga. . The communication with clients is TLS encrypted and authenticated using pre-shared keys (as per RFC 4279). The NSCA-ng server supports per-client passwords and fine-grained authorization control. debian/nsca-ng.local.cfg0000644000000000000000000000006312121042561012257 0ustar # please put your local modifications in this file debian/nsca-ng-server.dirs0000644000000000000000000000001412121042561012670 0ustar etc/nsca-ng debian/watch0000644000000000000000000000020412121042561010205 0ustar # format version number, currently 3; this line is compulsory! version=3 http://www.nsca-ng.org/download/nsca-ng-([\d\.]+)\.tar\.gzdebian/rules0000755000000000000000000000111312132026314010234 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 %: dh $@ --with autotools-dev override_dh_auto_clean: -rm config.log dh_auto_clean override_dh_auto_configure: dh_auto_configure -- --enable-server debian/patches/0000755000000000000000000000000012132442277010621 5ustar debian/patches/series0000644000000000000000000000003212121042561012017 0ustar nsca-ng.cfg_debian_config debian/patches/nsca-ng.cfg_debian_config0000644000000000000000000000222212132442277015455 0ustar Description: Debian specific settings Author: Alexander Wirt --- a/etc/nsca-ng.cfg +++ b/etc/nsca-ng.cfg @@ -8,9 +8,25 @@ # # 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 for nagios3 +command_file = "/var/lib/nagios3/rw/nagios.cmd" + +# command_file for icinga +#command_file= "/var/lib/icinga/rw/icinga.cmd" + +# Debian specific settings +listen = "localhost:5668" # only listen on localhost +user = "nagios" # run as user nagios +pid_file = "/var/run/nsca-ng/nsca-ng.pid" # pid file for nsca-ng # +# local configuration: +# if you'd prefer, you can instead place directives here +include(/etc/nsca-ng/nsca-ng.local.cfg) + +# +# # These configuration settings are optional. # # listen = "monitoring.example.com:5668" # Default: "*". @@ -105,6 +121,9 @@ # commands), at least one "commands" and/or "services" expression must be # specified. # +# This authorization line only allows pinging of the server, but you probably +# want to change the password if you go into production + authorize "*" { password = "change-me" # debian/docs0000644000000000000000000000002112121042561010024 0ustar NEWS README TODO debian/changelog0000644000000000000000000000114412236626736011055 0ustar nsca-ng (1.2-1) unstable; urgency=low * [594ee2f] Imported Upstream version 1.2 -- Alexander Wirt Thu, 07 Nov 2013 07:06:20 +0100 nsca-ng (1.1-1) unstable; urgency=low * [47cbbe8] Remove unused file * [6a8c9fc] Fix piddir generation in postinst (Closes: #705377) * [9e0c4dc] Imported Upstream version 1.1 * [126f404] Update nsca-ng.cfg_debian_config -- Alexander Wirt Sun, 14 Apr 2013 07:59:55 +0200 nsca-ng (0.3-1) unstable; urgency=low * Initial release -- Alexander Wirt Mon, 25 Feb 2013 17:50:06 +0100 debian/nsca-ng-client.examples0000644000000000000000000000023112121042561013516 0ustar contrib/README contrib/acknowledge contrib/debug_server contrib/disable_notifications contrib/downtime contrib/enable_notifications contrib/invoke_check debian/nsca-ng-server.default0000644000000000000000000000025312121042561013360 0ustar # /etc/default/nsca-ng # Please read /usr/share/doc/nsca-ng-server/README.Debian for information # how to get nsca-ng working # start nsca-ng daemon (no/yes) NSCA_NG=no debian/nsca-ng-client.install0000644000000000000000000000004512121042561013351 0ustar etc/send_nsca.cfg usr/sbin/send_nsca