Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckProbe
Updated: May 18, 2012
Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager
The Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckProbe probe action module type is used to provide status data for a specified TCP port. This module takes no input and returns Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckData data.
Usage
This module is commonly used to check the status of a selected TCP port. The status code that this module returns can be used with other modules to determine the success or cause of failure for a specific port.
Type Definition
<ProbeActionModuleType ID="Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckProbe" Accessibility="Public" Batching="false" PassThrough="false">
<Configuration>
<xsd:element name="ServerName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="Port" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="ServerName" Selector="$Config/ServerName$" ParameterType="string" />
<OverrideableParameter ID="Port" Selector="$Config/Port$" ParameterType="int" />
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Native>
<ClassID>41EB45CD-BF11-4E2A-8349-07DA48DEA806</ClassID>
</Native>
</ModuleImplementation>
<OutputType>Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckData</OutputType>
<TriggerOnly>true</TriggerOnly>
</ProbeActionModuleType>
Parameters
The Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckProbe module supports the following configuration parameters.
| Parameter | Type | Overrideable | Description |
|---|---|---|---|
|
ServerName |
String |
True |
Required parameter. Specifies the name of the server on which to check the port. |
|
Port |
Integer |
True |
Required parameter. Specifies the port to check on the specified server. |
Composition
The Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckProbe module is a native module.
Remarks
The status code that this module returns specifies the following connection status.
| Status Code | Definition |
|---|---|
|
0 |
Success |
|
2147952460 |
Connection timed out |
|
2147952461 |
Connection refused |
|
2147952465 |
Unreachable |
|
2147953401 |
DNS resolution failure |
External Module References
None.
Sample
The following example is a rule that checks for a connection on a specified TCP port. The Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckProbe module is used as a member module in a data source module that checks the TCP port status in a scheduled interval. That data source module is then used by a rule that evaluates the connection status returned by the Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckProbe probe action module type. If the returned connection status is any value other than 0, the rule issues an alert.
<TypeDefinitions>
<ModuleTypes>
<DataSourceModuleType ID="TCPPortCheck.ScheduledTCPDataSource" Accessibility="Internal" Batching="false">
<Configuration>
<xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:integer" />
<xsd:element minOccurs="0" name="SyncTime" type="xsd:string" />
<xsd:element minOccurs="1" name="ServerName" type="xsd:string" />
<xsd:element minOccurs="1" name="Port" type="xsd:integer" />
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int" />
<OverrideableParameter ID="SyncTime" Selector="$Config/SyncTime$" ParameterType="string" />
<OverrideableParameter ID="ServerName" Selector="$Config/ServerName$" ParameterType="string" />
<OverrideableParameter ID="Port" Selector="$Config/Port$" ParameterType="int" />
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<DataSource ID="TCPScheduler" TypeID="System!System.SimpleScheduler">
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime>$Config/SyncTime$</SyncTime>
</DataSource>
<ProbeAction ID="TCPPortProbe" TypeID="MicrosoftSystemCenterSyntheticTransactionsLibrary!Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckProbe">
<ServerName>$Config/ServerName$</ServerName>
<Port>$Config/Port$</Port>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="TCPPortProbe">
<Node ID="TCPScheduler" />
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>MicrosoftSystemCenterSyntheticTransactionsLibrary!Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckData</OutputType>
</DataSourceModuleType>
</ModuleTypes>
</TypeDefinitions>
<Monitoring>
<Rules>
<Rule ID="TCPPortCheck.TCPPortCheckRule" Enabled="true" Target="Windows!Microsoft.Windows.Computer" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Custom</Category>
<DataSources>
<DataSource ID="TCPDataSourceModule" TypeID="TCPPortCheck.ScheduledTCPDataSource">
<IntervalSeconds>900</IntervalSeconds>
<ServerName>ServerName</ServerName>
<Port>80</Port>
</DataSource>
</DataSources>
<ConditionDetection ID="StatusCodeFilter" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>StatusCode</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value>0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<WriteActions>
<WriteAction ID="TCPPortAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>2</Severity>
<AlertMessageId>$MPElement[Name="TCPPortCheck.PortCheckAlert"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>
</Rules>
</Monitoring>
Information
|
Module Type |
|
|
Input Type |
None |
|
Output Type |
Microsoft.SystemCenter.SyntheticTransactions.TCPPortCheckData |
|
Implementation |
Native |
|
Library |
Microsoft.SystemCenter.SyntheticTransactions.Library |