NRPE Checks on Windows Not Working

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
me@work55
Posts: 44
Joined: Sun Jan 22, 2017 6:15 pm

NRPE Checks on Windows Not Working

Post 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
Attachments
nsclient.ini
nsclient
(14.38 KiB) Downloaded 281 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE Checks on Windows Not Working

Post 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$
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE Checks on Windows Not Working

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
me@work55
Posts: 44
Joined: Sun Jan 22, 2017 6:15 pm

Re: NRPE Checks on Windows Not Working

Post 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$
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE Checks on Windows Not Working

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
me@work55
Posts: 44
Joined: Sun Jan 22, 2017 6:15 pm

Re: NRPE Checks on Windows Not Working

Post by me@work55 »

Thanks

All working now

This can be locked
Locked