System.NetworkManagement.SnmpTrapProvider
Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager
The System.NetworkManagement.SnmpTrapProvider data source module type is used to return SNMP traps as a System.SnmpData data type.
Usage
Use this module to receive SNMP trap events from within a workflow such as a rule or monitor.
Type Definition
<DataSourceModuleType ID="System.NetworkManagement.SnmpTrapProvider" Accessibility="Public" Batching="false">
<Configuration>
<xsd:element minOccurs="1" maxOccurs="1" name="IP" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element minOccurs="1" maxOccurs="1" name="CommunityString" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element minOccurs="0" maxOccurs="1" name="Version" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element minOccurs="0" maxOccurs="1" name="OIDProps" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="OIDProp" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="CodePage" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</Configuration>
<ModuleImplementation Isolation="Any">
<Native>
<ClassID>2B72C328-CDBB-421a-ACC3-A1994DBD52BB</ClassID>
</Native>
</ModuleImplementation>
<OutputType>Snmp!System.SnmpData</OutputType>
</DataSourceModuleType>
Parameters
The System.NetworkManagement.SnmpTrapProvider module supports the following configuration parameters:
Parameter | Type | Overrideable | Description |
---|---|---|---|
IP |
String |
False |
Required parameter. Specifies the IP address of the SNMP managed entity |
CommunityString |
String |
False |
Required parameter. Contains the SNMP Community String |
Version |
String |
False |
Optional parameter. Specifies the SNMP version. Valid values are 1, 2, and 3. |
OIDProps |
Complex type |
False |
Optional parameter. Contains a list of OIDs to register for traps |
OIDProps contains a list of at least one OIDProp element. Each OIDProp element represents an OID that traps from the targeted device will contain. For example:
<OIDProps>
<OIDProp>1.3.6.1.2.1.4.1.0</OIDProp>
</OIDProps>
Composition
The System.NetworkManagement.SnmpTrapProvider module is a native module.
The System.NetworkManagement.SnmpTrapProvider module wraps portions of the WinSNMP API. For a deeper understanding of how the module works internally, see the WinSNMP API Topic.
Errors
The following errors can occur from within the System.NetworkManagement.SnmpTrapProvider module. These errors appear in the Operations Manager event log on the agent.
Exception | Reason |
---|---|
11001 |
An SNMP GET message failed. |
11002 |
An SNMP SET message failed. |
11003 |
An error occurred when receiving an SNMP message, and the received varbind status was not valid. |
11004 |
The module failed to retrieve PDU data. |
11006 |
The module was unable to initialize the SNMP session. |
Related Modules
Module Type | Usage |
---|---|
Maps SNMP trap data to System.Event.Data. |
|
Uses an SNMP trap to trigger a rule. |
External Module References
Module Type | Usage |
---|---|
Maps SNMP trap data to System.Event.Data. |
Sample
The following XML example shows how System.NetworkManagement.SnmpTrapProvider is used in this UnitMonitorType to provide SNMP traps which are then evaluated according to a defined expression. Note that the Community String parameter is obtained from the RunAs account, rather than from a property on the SNMP device.
<UnitMonitorType ID="System.NetworkManagement.SnmpTrapProvider.2SingleEvent2StateMonitorType" Accessibility="Public">
<MonitorTypeStates>
<MonitorTypeState ID="FirstEventRaised" NoDetection="false" />
<MonitorTypeState ID="SecondEventRaised" NoDetection="false" />
</MonitorTypeStates>
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element minOccurs="1" maxOccurs="1" name="FirstIP" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element minOccurs="0" maxOccurs="1" name="FirstVersion" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element minOccurs="0" maxOccurs="1" name="FirstOIDProps" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="OIDProp" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="FirstExpression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element minOccurs="1" maxOccurs="1" name="SecondIP" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element minOccurs="0" maxOccurs="1" name="SecondVersion" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element minOccurs="0" maxOccurs="1" name="SecondOIDProps" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="OIDProp" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SecondExpression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</Configuration>
<MonitorImplementation>
<MemberModules>
<DataSource ID="FirstDataSource" TypeID="System.NetworkManagement.SnmpTrapProvider">
<IP>$Config/FirstIP$</IP>
<CommunityString>$RunAs[Name="System.NetworkManagement.Snmp.MonitoringAccount"]/CommunityString$</CommunityString>
<Version>$Config/FirstVersion$</Version>
<OIDProps>$Config/FirstOIDProps$</OIDProps>
</DataSource>
<DataSource ID="SecondDataSource" TypeID="System.NetworkManagement.SnmpTrapProvider">
<IP>$Config/SecondIP$</IP>
<CommunityString>$RunAs[Name="System.NetworkManagement.Snmp.MonitoringAccount"]/CommunityString$</CommunityString>
<Version>$Config/SecondVersion$</Version>
<OIDProps>$Config/SecondOIDProps$</OIDProps>
</DataSource>
<ConditionDetection ID="FirstFilterCondition" TypeID="System!System.ExpressionFilter">
<Expression>$Config/FirstExpression$</Expression>
</ConditionDetection>
<ConditionDetection ID="SecondFilterCondition" TypeID="System!System.ExpressionFilter">
<Expression>$Config/SecondExpression$</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="FirstEventRaised">
<Node ID="FirstFilterCondition">
<Node ID="FirstDataSource" />
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="SecondEventRaised">
<Node ID="SecondFilterCondition">
<Node ID="SecondDataSource" />
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>
Information
Module Type |
|
Input Type |
None |
Output Type |
|
Implementation |
Native |
Library |
System.NetworkManagement.Library |