Page 1 of 1

NRPE Checks on Windows Not Working

Posted: Sun Jan 22, 2017 6:46 pm
by me@work55
Nagios 3.2.3
NSCLient 4.1.73

Windows 2012 R2 Server

Defined host and several services all but two are working both are check_nrpe types. See below.

Code: Select all

define service {
        use                     generic-service
        host_name               metro-12r2-ltdb
        service_description     Check OS Version
        check_command           check_nrpe!CheckWMI! -a "Query=Select Version,Caption from win32_OperatingSystem" columnSyntax="%value%" columnSeparator=", " ignore-perf-data
        is_volatile             0
        check_period            24x7
        max_check_attempts      3
        normal_check_interval   5
        retry_check_interval    1
        contact_groups          NT-admins
        notification_interval   120
        notification_period     24x7
        notification_options    w,u,c,r
        servicegroups                   OSVersion
        use                             generic-service
}

define service {
        use                     generic-service
        host_name               metro-12r2-ltdb
        service_description     Check All Service
        check_command           check_nrpe!checkservicestate! -a CheckAll
        servicegroups           ALLServices
        is_volatile             0
        check_period            24x7
        max_check_attempts      3
        normal_check_interval   5
        retry_check_interval    1
        contact_groups          NT-admins
        notification_interval   120
        notification_period     24x7
        notification_options    w,u,c,r
}


Check All Service Notifications for this service have been disabled UNKNOWN 01-22-2017 18:34:08 6d 6h 33m 52s 3/3 ERROR: Missing argument exception.

Check OS Version Notifications for this service have been disabled CRITICAL 01-22-2017 18:34:08 10d 5h 19m 57s 3/3 Missing argument(s).

These are the first two services for Windows Server I defined using Check_NRPE

I attached my nsclient.ini file

Any thoughts on why this is not working? What am I missing here?

Thanks

Re: NRPE Checks on Windows Not Working

Posted: Mon Jan 23, 2017 4:18 pm
by tgriep
Can you post how your check_nrpe command is defined on your Nagios server?
It should look like the example below.

Code: Select all

 command_line                    $USER1$/check_nrpe -H $HOSTADDRESS$  -c $ARG1$ $ARG2$

Re: NRPE Checks on Windows Not Working

Posted: Mon Jan 23, 2017 4:25 pm
by tgriep
One more thing to change, the checkwmi command for the newer version of NSClient++ is check_wmi, try changing that in your check as well.

Re: NRPE Checks on Windows Not Working

Posted: Mon Jan 23, 2017 4:29 pm
by me@work55
# Use for nrpe (remote checking)
define command{
command_name check_nrpe
command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -t 30
}

do I need to add $ARG2$

Re: NRPE Checks on Windows Not Working

Posted: Mon Jan 23, 2017 4:43 pm
by tgriep
Yes, you need to add the $ARG2$ to the check_nrpe command.
That will set it up to use the arguments you have specified in your service check.

Re: NRPE Checks on Windows Not Working

Posted: Mon Jan 23, 2017 5:55 pm
by me@work55
Thanks

All working now

This can be locked