Page 1 of 2
WMI Fails to Check Services, Processes
Posted: Tue Sep 02, 2014 6:20 am
by mikew
I am trying to monitor services and processes on Windows 2008 R2 and 2012 R2 servers with WMI. I can get most of the other modes to work but checkservice and checkprocess fail on all Windows servers. I have used the WMI wizard, tested manually and have installed the latest check_wmi_plus 1.59 all with the same results.
I have checked permissions on all the temp files in /tmp and they are correct. This is the result I get.
Code: Select all
UNKNOWN - The WMI query had problems. The target host (xxx) 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 d
...NTSTATUS: NT code 0x80041003 - NT code 0x80041003
Any ideas?
I am using two different Nagios XI servers 2014R1.3 and 2014R1.4 with the same results. Checks for CPU, Drive, Memory, SQL, etc. all work.
Re: WMI Fails to Check Services, Processes
Posted: Tue Sep 02, 2014 9:02 am
by BanditBBS
Finally, something I can attempt to help with
Anyway, what permissions does the account have that you are connecting with? Is it an admin account? What happens if you try to check the status if a services that is part of Windows, i.e. DHCP Client or Print Spooler?
Re: WMI Fails to Check Services, Processes
Posted: Tue Sep 02, 2014 11:24 am
by mikew
If I try to monitor something like dchp client it comes back and says 0 instances but I can see it is running.
I can run 75% of the possible WMI checks, just services and processes are choking.
Re: WMI Fails to Check Services, Processes
Posted: Tue Sep 02, 2014 11:29 am
by BanditBBS
If the user is not an administrator there are special permissions that need applied to it can see the services and processes. If it is an admin, then I have no help to offer

I will try and find the permissions needed, we had a special script back at the old job to do this for us. Can't recall if I saved that anywhere as I am not the one who wrote it or the one who ran it.
Re: WMI Fails to Check Services, Processes
Posted: Tue Sep 02, 2014 11:47 am
by mikew
That may be it as the user only has access to Performance Log Users and Performance Monitor Users. I will test to see.
Update:
I added the user to the Administrators group and now it works fine....however I am not liking the security aspect so I need to be able to check but not give away the whole farm.
Re: WMI Fails to Check Services, Processes
Posted: Tue Sep 02, 2014 12:20 pm
by BanditBBS
Yeah, see, I can be useful, LOL.
Still looking, have a customer on site today so moving slow. I am thinking a I don't have it...but not giving up yet.
Re: WMI Fails to Check Services, Processes
Posted: Tue Sep 02, 2014 12:59 pm
by BanditBBS
http://support.nagios.com/forum/viewtop ... =10#p86082
That's the script we used at AEO to give the user permission to do everything except services, so it should resolve your processes issue. As for services, I can't find the script anywhere unfortunately. I just know we had to run the script that gave specific permissions for the user to see each and every service we wanted to monitor. So if there were 5 services on one server we had to run the script 5 times telling it the service names when run.
Re: WMI Fails to Check Services, Processes
Posted: Thu Sep 04, 2014 2:18 pm
by tmcdonald
BanditBBS wrote:Yeah, see, I can be useful, LOL.
I think this might be my new conference T-shirt
Mike, did you get a chance to try that script out?
Re: WMI Fails to Check Services, Processes
Posted: Mon Sep 08, 2014 1:52 pm
by mikew
I did not try the script yet as I also need the services. So in my mind, if I could solve the access to services that would be a similar solution to processes.
It is great to have the script but...ultimately I need services as well.
The other more important issue is that one reason for choosing WMI is not to add an agent, if I need to run a script I might as well use an agent.
Re: WMI Fails to Check Services, Processes
Posted: Mon Sep 08, 2014 1:58 pm
by BanditBBS
mikew wrote:I did not try the script yet as I also need the services. So in my mind, if I could solve the access to services that would be a similar solution to processes.
It is great to have the script but...ultimately I need services as well.
Ugh....I'll think about sending an email to the guy that wrote the services script. I really....just ugh, LOL. I'll let you know if I am successful!
Edit: Initiated contact to the guy that replaced me for the email address of the guy that has the services script.
Edit #2: I have reached out to the author of the script. I will reply again if he replies.