WMI Fails to Check Services, Processes

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

WMI Fails to Check Services, Processes

Post 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.
Mike Weber

Nagios Training/Consulting
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: WMI Fails to Check Services, Processes

Post 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?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: WMI Fails to Check Services, Processes

Post 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.
Mike Weber

Nagios Training/Consulting
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: WMI Fails to Check Services, Processes

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: WMI Fails to Check Services, Processes

Post 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.
Mike Weber

Nagios Training/Consulting
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: WMI Fails to Check Services, Processes

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: WMI Fails to Check Services, Processes

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: WMI Fails to Check Services, Processes

Post by tmcdonald »

BanditBBS wrote:Yeah, see, I can be useful, LOL.
I think this might be my new conference T-shirt :D

Mike, did you get a chance to try that script out?
Former Nagios employee
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: WMI Fails to Check Services, Processes

Post 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.
Last edited by mikew on Mon Sep 08, 2014 1:58 pm, edited 1 time in total.
Mike Weber

Nagios Training/Consulting
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: WMI Fails to Check Services, Processes

Post 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.
Last edited by BanditBBS on Mon Sep 08, 2014 2:42 pm, edited 1 time in total.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked