Page 1 of 1

Check_wmi query

Posted: Tue Dec 05, 2017 9:35 am
by neworderfac33
Good afternoon,
I have defined the following two services which run fine on 35 servers:

Code: Select all

#check_nrpe Number of Logical Processors
define service{
        use                     generic-service
        #host_name              MyHost
        hostgroup_name          MyHostGroups
        service_description     Logical_Processors_TA
        check_command           check_nrpe!check_wmi! -a "query=Select NumberOfLogicalProcessors from Win32_Processor"
}

#check_nrpe Number of Cores
define service{
        use                     generic-service
        #host_name              MyHost
        hostgroup_name          MyHostGroups
        service_description     Cores_TA
        check_command           check_nrpe!check_wmi! -a "query=Select NumberOfCores from Win32_Processor"
}
both services report "1,1,1,1" on all servers but one, where both services report:

Code: Select all

Unknown command(s): check_wmi 
I have remoted onto the server and run:

Code: Select all

C:\Program Files\NSClient++\nscp.exe settings --activate-module CheckWMI --add-defaults
with no errors, and I've reinstalled NSClient++ (which has NRPE support in the nsclient++.ini which is used on all the other hosts too)

Can anyone think of anything I might have missed on this one particular host?

Thanks in advance

Pete

Re: Check_wmi query

Posted: Tue Dec 05, 2017 4:43 pm
by tgriep
What version of NSClient++ do you have installed on the server that is causing the issue?
What OS and patch level is the Windows server running?
Can you post the nsclient.ini file so we can view the settings for the NSClient++ agent?

Re: Check_wmi query

Posted: Tue Dec 05, 2017 4:48 pm
by cdienger
Make sure to restart the nsclient++ service on the Windows machien after adding the module. If this doesn't resolve it, please provide a copy of the nsclient.ini and nsclient.log file found on the Windows server.

Re: Check_wmi query

Posted: Wed Dec 06, 2017 5:31 am
by neworderfac33
Good morning all and thanks for your interest.
Not really sure what happened, but I ran the command to enable check_wmi manually on the server once more before I wnet home, and when i came in this morning, it was reporting 1,1,1,1 again.
The issue is resolved and the thread can be closed.
Thanks
Pete

Re: Check_wmi query

Posted: Wed Dec 06, 2017 2:29 pm
by kyang
Sounds good! I'll be closing this thread!

If you have any more questions, feel free to create another thread.

Thanks for using the Nagios Support Forum!