Changes between Version 6 and Version 7 of CheckWMI/CheckWMI


Ignore:
Timestamp:
09/20/09 18:07:02 (4 years ago)
Author:
mickem
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CheckWMI/CheckWMI

    v6 v7  
    6767=== A sample query === 
    6868A not very useful check which serves to illustrate how to use the command. Check to see if there is 2 CPUs present (or cores) 
     69 
    6970[[NSClientCommand(CheckWMI,MaxCrit=3 MinWarn=1 "Query=Select * from win32_Processor")]] 
    7071[[NSClientResult(WARNING,WARNING:: 1 < warning,''=1;0;3;)]] 
    7172[[NSClientConfig()]] 
    7273 
    73  
    7474=== Using Query Alias === 
    7575Adding query alias to the not very useful check above (Alias is '''cpu''') 
     76 
    7677[[NSClientCommand(CheckWMI,MaxCrit=3 MinWarn=1 "Query:cpu=Select * from win32_Processor")]] 
    7778[[NSClientResult(WARNING,WARNING:: cpu: 1 < warning,'cpu'=1;0;3;)]] 
     
    8081=== Overriding Query Alias === 
    8182Overriding the previous query alias with '''foobar''' 
     83 
    8284[[NSClientCommand(CheckWMI,MaxCrit=3 MinWarn=1 "Query:cpu=Select * from win32_Processor" Alias=foobar)]] 
    8385[[NSClientResult(WARNING,WARNING:: foobar: 1 < warning,'foobar'=1;0;3;)]] 
     
    8587 
    8688=== Checking With filters === 
    87 THis uses the UserAccount object to query if any enabled users have password expires set to false. 
     89This uses the UserAccount object to query if any enabled users have password expires set to false. 
     90 
    8891[[NSClientCommand(CheckWMI,CheckWMI MaxCrit=3 MaxWarn=1 "Query:badUsers=Select Name, PasswordExpires, Disabled from Win32_UserAccount" "columnSyntax=%Name%" "columnSeparator= & " +filter-numeric:PasswordExpires==0 +filter-numeric:Disabled==0)]] 
    8992[[NSClientResult(WARNING,WARNING:mickem & Xiqun Liao, badUsers: 2 > warning|'badUsers'=2;1;3;)]]