Page 1 of 1

check_wmi_plus checkservice not working

Posted: Fri Mar 02, 2012 2:51 pm
by slocrystal
I am not sure if I am using the checkservice correcly but I am getting the following response.

"UNKNOWN - The WMI query had problems. The target host (192.168.10.75) might not have the required WMI classes installed. This can happen, for example, if you are trying to checkiis but IIS is not installed. It can also happen if your version of Windows do"

I have the check setup as

./check_wmi_plus.pl -H HOSTADDRESS -u user -p password -m checkserivce "servicename"

Any ideas, the other services like checkcpu etc work fine.

Thanks.

Re: check_wmi_plus checkservice not working

Posted: Fri Mar 02, 2012 3:14 pm
by lmiltchev
Can you try adding an "- a" flag to your command and wrapping the servicename is single quotes?

Code: Select all

 ./check_wmi_plus.pl -H HOSTADDRESS -u user -p password -m checkservice -a 'servicename'
You also had a typo in "checkservice" - not sure if you used the same command in your check or made a mistake while typing your post.

P.S. Make sure you use a correct servicename.

Hope this helps.

Re: check_wmi_plus checkservice not working

Posted: Fri Mar 02, 2012 4:38 pm
by slocrystal
I receive the same error with the -a. The service name I had already been wrapping in single quotes. It is stating in the longer description that it's possible that the class is not on the destination machine. The machine I am trying to check the service on is a server core 2008 install.

Re: check_wmi_plus checkservice not working

Posted: Fri Mar 02, 2012 4:52 pm
by yancy
which service are you trying to check?

Try the cpu service check for example:
check_wmi_plus.pl -H HOST -u USER -p PASS -m checkcpu

Here's a list of some usefull examples to try:
http://www.edcint.co.nz/checkwmiplus/?q=node/57

Re: check_wmi_plus checkservice not working

Posted: Fri Mar 02, 2012 5:06 pm
by slocrystal
I am able to use the checkcpu and some of the others without issue. The one I am trying to do is the actual "checkservice" The example from the link you gave me is as follows:

Check all services with the string 'windows' in the short or long name
Command: check_wmi_plus.pl -H HOST -u USER -p PASS -m checkservice -a windows

When I put in my host ip, username and password (same as I use for my other working checks) and then add my service name or a portion of the service name both in single quotes or without quotes I get the same error:

"UNKNOWN - The WMI query had problems. The target host (IP of host) might not have the required WMI classes installed. This can happen, for example, if you are trying to checkiis but IIS is not installed. It can also happen if your version of Windows does not support this check (this might be because the WMI fields are named differently in different Windows versions). Sometimes, some systems 'lose' WMI Classes and you might need to rebuild your WMI repository. Other causes include mistyping the WMI namespace/class/fieldnames. There may be other causes as well. You can use wmic from the command line to troubleshoot. Wmic error text on the next line.
ERROR: Retireve result data.
NTSTATUS: NT code 0xc0041003 - NT code 0xc0041003"

I will dig around in the WMI on my server core machine to see if maybe they changed the name of that check?

Re: check_wmi_plus checkservice not working

Posted: Fri Mar 02, 2012 5:46 pm
by lmiltchev
Make sure the "checkservice" is the proper name to be used. Check for spaces, etc. It has to be exact, for example "ProtectedStorage" is not the same as "Protected Storage".

Re: check_wmi_plus checkservice not working

Posted: Fri Mar 02, 2012 6:08 pm
by slocrystal
I changed the checkservice to CheckService and now I get a message that says "A valid MODE and/or SUBMODE must be specified"

Re: check_wmi_plus checkservice not working

Posted: Mon Mar 05, 2012 10:40 am
by lmiltchev
Try to follow the steps outlined here:

http://edcint.co.nz/checkwmiplus/?q=node/55

Let us know if this helped.

Re: check_wmi_plus checkservice not working

Posted: Tue Mar 06, 2012 1:43 pm
by slocrystal
The ini file seems to be the same and the plugin is the latest.

Re: check_wmi_plus checkservice not working

Posted: Tue Mar 06, 2012 3:24 pm
by lmiltchev
What is the output when you run in terminal:

Code: Select all

./check_wmi_plus.pl -H <IP> -u <username> -p <password> -m  checkservice -a 'windows'
I found a Matthew Jurgens' post, concerning a similar issue: "using versions of perl modules older than the recommended ones was the cause of the problem - specifically Config::Inifiles." I am not sure if your issue is caused by an old perl modules, but you can try:

Code: Select all

#  yum list installed perl-Config-IniFiles
and then upgrade the installed package:

Code: Select all

# yum upgrade <your_perl_config-inifiles_package>