Microsoft.Windows.Discovery.WMISinglePropertyProvider2
Applies To: Operations Manager 2007 R2
The Microsoft.Windows.Discovery.WMISinglePropertyProvider2 module is a data source module type that queries Windows Management Instrumentation (WMI) for object and single property data at a scheduled, recurring interval and returns the results as System.Discovery.Data type data.
Usage
Use this module only when you are creating a discovery workflow. For more information about Discoveries in management packs, see Discovery.
Type Definition
<DataSourceModuleType ID="Microsoft.Windows.Discovery.WMISinglePropertyProvider2" Accessibility="Public">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.Discovery.MapperSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element name="NameSpace" type="xsd:string" />
<xsd:element name="Query" type="xsd:string" />
<xsd:element name="Frequency" type="xsd:unsignedInt" />
<xsd:element name="ClassID" type="xsd:string" />
<xsd:element name="PropertyName" type="xsd:string" />
<xsd:element name="InstanceSettings" type="SettingsType" />
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
</OverrideableParameters>
<ModuleImplementation>
<Composite>
<MemberModules>
<DataSource ID="DS" TypeID="Microsoft.Windows.WmiProvider">
<NameSpace>$Config/NameSpace$</NameSpace>
<Query>$Config/Query$</Query>
<Frequency>$Config/Frequency$</Frequency>
</DataSource>
<ConditionDetection ID="Mapping" TypeID="System!System.Discovery.ClassSnapshotDataMapper">
<ClassId>$Config/ClassID$</ClassId>
<InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
</ConditionDetection>
</MemberModules>
<Composition>
<Node ID="Mapping">
<Node ID="DS" />
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>
Parameters
The Microsoft.Windows.Discovery.WMISinglePropertyProvider2 supports the configuration parameters described in the following table.
Parameter | Type | Overrideable | Description |
---|---|---|---|
Namespace |
String |
False |
Required parameter. Specifies the WMI namespace within which the module is to run the query. |
Query |
String |
False |
Required parameter. Specifies the SELECT WMI query to run. |
Frequency |
Unsigned Integer |
True |
Required. Specifies the frequency in seconds at which to run the WMI. |
ClassID |
GUID |
False |
Required. Specifies the ID of the class type into which the WMI object is to be mapped. Must always be in the following format: |
PropertyName |
String |
False |
Required. Specifies the WMI property name whose value is to be returned from the query and mapped into a property of the class type specified in the ClassID parameter. |
InstanceSettings |
False |
Required. Defines all property values of the discovered class type instances. |
For more information about the Namespace and Query parameters, see the Microsoft.Windows.WmiProbe module.
Composition
The Microsoft.Windows.Discovery.WMISinglePropertyProvider2 module is a composite module that contains the member modules described in the following table.
Workflow Run Order | Module Type | Usage |
---|---|---|
1 |
Returns the queried WMI object data as System.PropertyBagData and passes it on to the subsequent mapping module. |
|
2 |
Maps the received System.PropertyBagData data into System.Discovery.Data. |
Related Modules
Module Type | Usage |
---|---|
Queries Windows Management Instrumentation (WMI) for object data at a scheduled, recurring interval and returns discovered class type instance as System.Discovery.Data type data. |
External Module References
None.
Sample
The following XML sample shows how you can use the Microsoft.Windows.Discovery.WMISinglePropertyProvider2 module in a Discovery element definition. The class type, ExtendedWindowsServer2008ComputerClassType
, is the class type to be discovered. The WMI object will be mapped to this class type. Its property, ServerBootupState
, can now be used as criteria for workflows such as rules or monitors.
<ClassType>
<ClassType ID="ExtendedWindowsServer2008ComputerClassType" Base="WindowsLibrary!Microsoft.Windows.Server.2008.Computer">
<Property ID="ServerBootupState" Type="string" Key="false" CaseSensitive="false" Length="256" MinLength="0"/>
</ClassType>
</ClassType>
…
<Discovery ID="WMIObjectDiscovery" Enabled="true" Target="WindowsLibrary!Microsoft.Windows.Server.2008.Computer" ConfirmDelivery="False" Remotable="true" Priority="Normal">
<Category></Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="ExtendedWindowsServer2008ComputerClassType">
<Property Type="ExtendedWindowsServer2008ComputerClassType" PropertyID="ServerBootupState"/>
</DiscoveryClass>
</DiscoveryTypes>
<DataSource ID="DiscoveryDS" TypeID="Windows!Microsoft.Windows.Discovery.WMISinglePropertyProvider2">
<NameSpace>\\$Target/Host/Property[Type="WindowsLibrary!Microsoft.Windows.Server.2008.Computer"]/NetworkName$\Root\CIMv2</NameSpace>
<Query>SELECT * from Win32_ComputerSystem WHERE Name = '$Target/Property[Type="WindowsLibrary!Microsoft.Windows.Server.2008.Computer"]/PrincipalName$'</Query>
<Frequency>30</Frequency>
<ClassID>$MPElement[Name="ExtendedWindowsServer2008ComputerClassType"]$</ClassID>
<PropertyName>BootupState</PropertyName>
<InstanceSettings>
<Settings>
<Setting>
<Name>$MPElement[Name="ExtendedWindowsServer2008ComputerClassType"]/ServerBootupState$</Name>
<Value>$Data/Property[@Name="BootupState"]</Value>
</Setting>
<Setting>
<Name>$MPElement[Name="WindowsLibrary!Microsoft.Windows.Server.2008.Computer"]/PrincipalName$</Name>
<Value>$Target/Property[Type="WindowsLibrary!Microsoft.Windows.Server.2008.Computer"]/PrincipalName$</Value>
</Setting>
</Settings>
</InstanceSettings>
</DataSource>
</Discovery>
Information
Module Type |
|
Input Type |
None |
Output Type |
|
Implementation |
Composite |
Library |
Microsoft.Windows.Library |