WMICHECK error

Anthony Montibello amontibello at gmail.com
Fri May 20 07:02:40 CEST 2005


Please remember to include the PLUGIN name in the subject (NC_Net)

Sorry For the confusion,

It seems like one of the samples in the sample config has a typo, but
the README for the WMICHECK should have been correct. also the help
should have been correct,  ./check_nt --help=WMICHECK

The delimiter used in the WMI commands was changed in beginning of April to ^
your command was: 
-l "cimv2^select freespace from win32_logicaldisk&name='c:'" 

should be one of the following:
-l "cimv2^select freespace from win32_logicaldisk where name='c:'" 
-l "cimv2^freespace^win32_logicaldisk^name='c:'"

Bellow is more detail about the WMI checks:

There are three different checks to test WMI each interprets the
output slightly differently:

WMICHECK just spits out on multilines the query result,
WMICOUNTER - parses the numbers out of the results, and can check for
Warning or critical thresholds
WMICAT parses the query results into a '<comma><space>' delimited string 

-v WMICAT -l "cimv2^name^win32_logicaldisk"
A:, C:, D:, E:, H:, I:, J:
I cannot run the Query  -v WMICAT -l "cimv2^name,freespace^win32_logicaldisk"
because drive A and D do not have a freespace object as a WMICAT will
show, however I can run the query excluding drive A and drive D
-v WMICAT -l "cimv2^name,freespace^win32_logicaldisk^name!='a:' and name!='d:'"
C:, 1796866048, E:, 15389466624, H:, 20499869696, I:, 39081730048, J:,
21114593280

WMICOUNTER can be used to check a max or min on a query. run as is it
will return a minimum and compare to the threshold values of -w or -c
(both c,w  are optional) if the counters value is less then the
threshold an alert happens (exit code 1,2)  However the switch -d
SHOWALL will flip this check around and check for a MAX value and
return an alert when the counter value is greater than the thresholds
of -c or -w  (remember the -v and -d parameters must be all caps)
-v WMICOUNTER -l "cimv2^name,freespace^win32_logicaldisk^name!='a:'
and name!='d:'"
1796866048.00000
1796866048.000000 Showfail
-v WMICOUNTER -l "cimv2^name,freespace^win32_logicaldisk^name!='a:'
and name!='d:'" -d showall
1796861952.00000
1796861952.000000 Showfail
-v WMICOUNTER -l "cimv2^name,freespace^win32_logicaldisk^name!='a:'
and name!='d:'" -d SHOWALL
39081730048.00000
39081730048.000000 Showall

-v WMICHECK -l "cimv2^name,freespace^win32_logicaldisk"
instance of Win32_LogicalDisk
{
        Name = "A:";
};

instance of Win32_LogicalDisk
{
        FreeSpace = "1796878336";
        Name = "C:";
};

instance of Win32_LogicalDisk
{
        Name = "D:";
};

instance of Win32_LogicalDisk
{
        FreeSpace = "15389573120";
        Name = "E:";
};

instance of Win32_LogicalDisk
{
        FreeSpace = "20499869696";
        Name = "H:";
};

instance of Win32_LogicalDisk
{
        FreeSpace = "39081730048";
        Name = "I:";
};

instance of Win32_LogicalDisk
{
        FreeSpace = "21483036672";
        Name = "J:";
};

Hope this helps ,
TOny

On 5/19/05, Harris, Sam <Sam.Harris at fns.usda.gov> wrote:
> We have struggling with this for a while now, can you see anything I don't
> see
>  
> this is running on Fedora3, connecting to 2003 server, check_nt version is 
> (nagios-plugins 1.4) 1.18
>  
>  
> root at acuoss libexec]# ./check_nt -H 30.30.30.9 -v WMICHECK -l "cimv2^select
> freespace from win32_logicaldisk&name='c:'" 
> Client - ERROR: Cannot Process use * for root namespace list.
>  
> Thanks
>  
>  
> Sam Harris
> Security Administrator
> AcuSys, Inc.
> (703)894.1300
>


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
_______________________________________________
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