check_nsca
    Check if the Nagios Service Check Acceptor is running and can successful
    submit check results to a running Nagios or Icinga instance.

SYNOPSIS
    ./check_nsca [options]

     Options:

        --help
        --debug
        --version

        --send_nsca
        --send_nsca_cfg

        --nsca_send_host
        --nsca_receive_host
        --nsca_check_description
        --nsca_check_result

        --livestatus_socket
        --sleeptime
        --timeout

OPTIONS
    --help  Produces this output.

    --debug Print debug output on STDERR.

    --version
            Print current version number of this check.

    --send_nsca
            Path to the send_nsca binary (default: /usr/bin/send_nsca).

    --send_nsca_cfg
            Path to the send_nsca configuration file (default:
            /etc/send_nsca.cfg).

    --nsca_receive_host
            The hostname with the NSCA test definition (used in send_nsca).

    --nsca_check_description
            The service description of the NSCA test definition (default:
            'NSCA dummy test').

    --nsca_check_result
            The content of the NSCA test result (will be ignored, but might
            be useful for humans (default: 'Last test run:').

    --sleeptime
            How long in seconds to wait between the submission of the test
            result and the search for the correct value (NSCA <->
            Nagios/Icinga <-> updated result; default: 5).

    --timeout
            Timeout in seconds for the whole script, to not hang Nagios
            (default: 60).

    --livestatus_socket
            The path to the livestatus socket (default:
            /var/spool/check_mk/livestatus.cmd)

DESCRIPTION
    Sometimes you wonder if your NSCA is still up and running (especially if
    you forget to define freshness values for your passive checks ;-). This
    script might help you here as it:

    *       sends a test message to your NSCA instance

    *       waits a few seconds (to give NSCA and Nagios/Icinga time to
            process the results)

    *       checks if the message was delivered to Nagios/Icinga
            successfully by checking the result of the check

CONFIGURATION
    Write the following in your /etc/icinga or /etc/nagios configuration
    files: define command{ command_name check_nsca command_line
    $USER1$/check_nsca }

     define service {
            use                     nsca-service-template
            hostgroup_name          nsca_dummy_check
            check_freshness         1
            freshness_threshold     93600   ; 26 hour threshold
            service_description     NSCA dummy test
            check_period            none
     }

     define service {
            use                     service-template
            hostgroup_name          check_nsca
            service_description     NSCA
            check_command           check_nrpe!check_nsca
     }

    and in /etc/nrpe.cfg (or in /etc/nrpe.d/nsca.cfg):
    command[check_nsca]=/usr/lib/nagios/plugins/check_nsca

AUTHORS
    Written by Lars Vogdt <lrupp@suse.com>

SUPPORT
    Please use https://bugzilla.suse.com to submit patches or suggest
    improvements.

    Include version information with all correspondence (when possible use
    output from the --version option of the plugin itself).

