Page 1 of 1

my new nagios installation can not monitor windows servers

Posted: Tue Feb 21, 2017 1:25 am
by baber
Dear all
Hi

i have a strange problem
i have installed nsclient on my windows server and add this server to my first nagios server and all of things are ok and work perfect then i disjoin this server from nagios one and add to second nagios but now on second nagios show unknow and (No output returned from plugin)
this error appear

Code: Select all

  UNKNOWN   (for 0d 18h 45m 7s)
Status Information:	(No output returned from plugin)
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
\nUsage: check_nrpe -H <host> [ -b <bindaddr> ] [-4] [-6] [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]
\nOptions:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
<host> = The address of the host running the NRPE daemon
<bindaddr> = bind to local address
-4 = user ipv4 only
-6 = user ipv6 only
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.
\nNote:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.

and this is my config file for host and services

Code: Select all

define host{
use                     windows-server
host_name             npmbdlsrv
alias             Download Server Mobile Bank
address             10.x.x.x
}

define service{
        use                     15minute-service
        host_name               npmbdlsrv
        service_description     Cpu Usage
        check_command           check_nrpe!alias_cpu
        }

define service{
        use                     15minute-service
        host_name               npmbdlsrv
        service_description     Disk Space
        check_command           check_nrpe!alias_volumes
        }

define service{
        use                     local-service
        host_name               npmbdlsrv
        service_description     Time
        check_command           check_nrpe!check_windows_time
        }
what is my problem ?

BR

Re: my new nagios installation can not monitor windows serve

Posted: Tue Feb 21, 2017 11:50 am
by mcapra
Can you share the output of the following command executed from the CLI of your Nagios Core machine (using the host's logical address):

Code: Select all

ip addr
/usr/local/nagios/libexec/check_nrpe -H 10.x.x.x
Feel free to PM the results if they contain sensitive information. I'd like to be sure the Nagios Core machine's IP address is in the NSClient++ configuration as an allowed host.

Can you also share the NSClient++ configuration file from the remote machine?

Re: my new nagios installation can not monitor windows serve

Posted: Tue Feb 21, 2017 1:52 pm
by baber
mcapra wrote:Can you share the output of the following command executed from the CLI of your Nagios Core machine (using the host's logical address):

Code: Select all

ip addr
/usr/local/nagios/libexec/check_nrpe -H 10.x.x.x
Feel free to PM the results if they contain sensitive information. I'd like to be sure the Nagios Core machine's IP address is in the NSClient++ configuration as an allowed host.

Can you also share the NSClient++ configuration file from the remote machine?

i will be send that for you but i am sure IP address is in the NSClient++ configuration as an allowed host because when i change ip adress on nsclient and use new nagios ip adress (second nagios) it will be work perfect

Re: my new nagios installation can not monitor windows serve

Posted: Tue Feb 21, 2017 5:02 pm
by dwhitfield
Did you upgrade NSClient during this process? Upgrades of NSClient often break configs.

If you could PM me that NSClient config and the output of the command, that would be great. Thanks!