Using Wmic to monitore W2k12

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
GeraldGeniaut
Posts: 7
Joined: Mon Apr 20, 2015 9:51 am

Using Wmic to monitore W2k12

Post by GeraldGeniaut »

Hi,

I have a Cluster of Files Server under win2012. It is setup as Actif/Actif.
I wanna monitore it with my Nagios.
I add wmic binary file to check wmi.

All is good for example :

- wmic -U 'Domain\admin'%password --namespace='Root\cimv2' //192.168.174.230 "select * from win32_process"

=> Good result.

But if I wanna check root\MSCLUSTER I get error :

- wmic -U 'Domain\admin'%password --namespace='Root\MSCluster' //192.168.174.230 "select * from MSCluster"

[wmi/wmic.c:212:main()] ERROR: Retrieve result data.
NTSTATUS: NT code 0x80041010 - NT code 0x80041010

I find out where my error comes : it is becouse the Namespace root\mscluster need pktprivacy to by chech in remote access.

The problem is how to use pktprivacy with wmic ? I try with option
--use-security-mechanisms=Pktprivacy but is doesn't work.

Other solution : how disable the pktprivacy for the namespace ?

Thanks for your help

Gérald
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Using Wmic to monitore W2k12

Post by jdalrymple »

From a high level - I see 2 solutions.

1) Doesn't appear to be possible - but can you relax the security mechanism requirements for that WMI namespace? I didn't see a quick solution to doing that.

2) If the Linux wmic isn't going to work, would it be possible to replicate the check using a Powershell script and run it remotely? If you need help with this we can probably give you some guidelines.
GeraldGeniaut
Posts: 7
Joined: Mon Apr 20, 2015 9:51 am

Re: Using Wmic to monitore W2k12

Post by GeraldGeniaut »

Hi,

thanks for your reply. I don't want to use powershell script like a nrpe system. Actually I'm looking for downgrade the security of the namespace but...

It is very strange that wmic can't ask with this type of security, becouse I read in stackoverflow that for IIS6 it is the same security level. I'm sure that there are plenty of admin whose need to monitore IIS with wmi. I hope their solution will work for me. ;-)

Thanks !

Gérald
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Using Wmic to monitore W2k12

Post by lmiltchev »

Gérald, let us know if we can lock this topic and mark it as "resolved".
Be sure to check out our Knowledgebase for helpful articles and solutions!
GeraldGeniaut
Posts: 7
Joined: Mon Apr 20, 2015 9:51 am

Re: Using Wmic to monitore W2k12

Post by GeraldGeniaut »

Yes if I find a solution, I'll post it here and tag as resolved.

Thanks
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Using Wmic to monitore W2k12

Post by jdalrymple »

GeraldGeniaut,

as you know we rely on wmic for these checks. While it's a great tool, in-house knowledge of it just doesn't exist. You might point this problem out to the develoepr:

http://www.aldeid.com/wiki/Wmic-linux
Locked