Check_wmi query

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
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Check_wmi query

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

Re: Check_wmi query

Post 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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Check_wmi query

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
neworderfac33
Posts: 329
Joined: Fri Jul 24, 2015 11:04 am

Re: Check_wmi query

Post 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
kyang

Re: Check_wmi query

Post 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!
Locked