• Sponsorship

  • NSClientListener.dll

    The NSClientListener module is written to allow backwards compatibility with the old NSClient and check_nt. It has a listener (server) that accepts checks from the check_nt command and responds accordingly. Due to the nature of the protocol and the limitation in the client NRPE is recommended but if you like this works just fine for "simple things".

    The following check_nt checks are supported.

    • CLIENTVERSION
    • CPULOAD
    • UPTIME
    • USEDDISKSPACE
    • MEMUSE
    • SERVICESTATE
    • PROCSTATE
    • COUNTER

    Configuration

    NSClient

    This is the NSClient module configuration options.

    OptionDefault valueDescription
    port12489The port to listen to
    obfuscated_password An obfuscated version of password. For more details refer to the password option below.
    password The password that incoming client needs to authorize themselves by. This option will replace the one found under Settings for NSClient. If this is blank the option found under Settings will be used. If both are blank everyone will be granted access.
    allowed_hosts A list (coma separated) with hosts that are allowed to poll information from NSClient++. This will replace the one found under Setting for NSClient if present. If not present the same option found under Settings will be used. If both are blank all hosts will be allowed to access the system. BEWARE: NSClient++ will not resolve the IP address of DNS entries if the service is set to startup automatically. Use an IP address instead or set cache_allowed_hosts=0 see above.
    bind_to_address The address to bind to when listening to sockets, useful if you have more then one NIC/IP address and want the agent to answer on a specific one.
    socket_timeout30The timeout when reading packets on incoming sockets. If the data has not arrived within this time we will bail out. and discard the connection.
    versionautoThe version number to return for the CLIENTVERSION check (useful to "simulate" an old/different version of the client, auto will be generated from the compiled version string inside NSClient++

    Advanced options:

    OptionDefault valueDescription
    socket_back_log Number of sockets to queue before starting to refuse new incoming connections. This can be used to tweak the amount of simultaneous sockets that the server accepts. This is an advanced option and should not be used.

    Examples

    Check the size of C:\ and make sure it warns at 80% used and a critical warning at 95% used:

     define command {
       command_name check_nt_disk
       command_line $USER1$/check_nt -s passphrase -H $HOSTADDRESS$ -p 12489 -v USEDDISKSPACE -l $ARG1$ -w $ARG2$ -c $ARG3$
     }
     check_command check_nt_disk!c!80!95
    

    Check Perfmon value for File IO reads

     define command {
       command_name check_io_read
       command_line /usr/local/nagios/libexec/check_nt -H $HOSTADDRESS$ -v COUNTER -l "\\System\\File Read Bytes/sec"
     }
     check_command check_io_read