Page 1 of 1

Using Wmic to monitore W2k12

Posted: Mon Apr 20, 2015 10:06 am
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

Re: Using Wmic to monitore W2k12

Posted: Mon Apr 20, 2015 4:42 pm
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.

Re: Using Wmic to monitore W2k12

Posted: Tue Apr 21, 2015 2:01 am
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

Re: Using Wmic to monitore W2k12

Posted: Tue Apr 21, 2015 9:42 am
by lmiltchev
Gérald, let us know if we can lock this topic and mark it as "resolved".

Re: Using Wmic to monitore W2k12

Posted: Wed Apr 22, 2015 2:27 am
by GeraldGeniaut
Yes if I find a solution, I'll post it here and tag as resolved.

Thanks

Re: Using Wmic to monitore W2k12

Posted: Wed Apr 22, 2015 10:42 am
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