check_nc_net and WMICHECK

Boyer, Timothy A. Timothy.Boyer at opm.gov
Wed Jan 11 20:54:12 CET 2012


I'm having some issues trying to do WMI queries, and was hoping for some help from the list.

First of all, something simple.  Help on the check_nc_net says:

#     * - list all namespaces
#     namespace^* - list all classes in namespace
#     namespace^ full query statement - enter a full query statement as second parameter
#     namespace^*^class - list all instances in class

'List all classes in namespace' works fine.  'List all instances in class' doesn't:

# ./check_nc_net -H 192.168.0.2 -v WMICHECK -l "DEFAULT^*^StdRegProv"
Client - ERROR: Could not find result

# ./check_nc_net -H 192.168.0.2 -v WMICHECK -l "DEFAULT^*^RegistryEvent"
Client - ERROR: Could not find result

Same result no matter what class.

Second, I'm trying to do a WMI query.  Most work just fine,  but others - straight from the WQL examples - don't.  Specifically, I'm trying to look for a registry change, like so:

./check_nc_net -H 192.168.0.2 -v WMICHECK -l "CIMV2^SELECT * FROM __InstanceModificationEvent WITHIN 10 WHERE TargetInstance ISA 'Win32_Service' AND TargetInstance._Class = 'win32_TerminalService'"

and I get back

Client - ERROR: Exeption occured in check wmi:
Select: cimv2:SELECT * FROM __InstanceModificationEvent WITHIN 10 WHERE TargetInstance ISA 'Win32_Service' AND TargetInstance._Class = 'win32_TerminalService'::>Invalid query
+ exit 0


Am I missing something simple, or is this just not possible?

Thanks....




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20120111/9389821b/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list