Alert on SNMP Trap

Microsoft.SystemCenter.MPAuthoringConsole.Template.Rule.SnmpTrapAlert (Template)

Source Code:

<Template ID="Microsoft.SystemCenter.MPAuthoringConsole.Template.Rule.SnmpTrapAlert">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.ParamListSchema</SchemaType>
<SchemaType>Microsoft.SystemCenter.MPAuthoringConsole.SchemaType.ManagementPackCategoryType</SchemaType>
<SchemaType>Microsoft.SystemCenter.MPAuthoringConsole.SchemaType.ManagementPackIdentifiers</SchemaType>
</IncludeSchemaTypes>
<xsd:element name="ID" type="ManagementPackUniqueIdentifier"/>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="Description" type="xsd:string"/>
<xsd:element name="Target" type="xsd:string"/>
<xsd:element name="Category" type="ManagementPackCategoryType"/>
<xsd:element name="LocaleID" type="ManagementPackLanguageIdentifier"/>
<xsd:element minOccurs="1" maxOccurs="1" name="IP" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="CommunityString" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="AllTraps" type="xsd:boolean"/>
<xsd:element minOccurs="0" maxOccurs="1" name="OIDProps">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="OIDProp" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Priority">
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="Severity">
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="2"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="AlertName" type="xsd:string"/>
<xsd:element name="AlertDescription" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="AlertOwner" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Suppression" minOccurs="0" maxOccurs="1">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SuppressionValue" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Custom1" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom2" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom3" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom4" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom5" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom6" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom7" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom8" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom9" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Custom10" type="xsd:string" minOccurs="0" maxOccurs="1"/>
</Configuration>
<References>
<Reference ID="System"/>
<Reference ID="SNMP"/>
<Reference ID="Health"/>
</References>
<Implementation>
<Monitoring>
<Rules>
<Rule ID="$TemplateConfig/ID$" Target="$TemplateConfig/Target$">
<Category>$TemplateConfig/Category$</Category>
<DataSources>
<DataSource ID="DS" TypeID="$Reference/SNMP$System.SnmpTrapEventProvider">
<IP>$TemplateConfig/IP$</IP>
<CommunityString>$TemplateConfig/CommunityString$</CommunityString>
<AllTraps>$TemplateConfig/AllTraps$</AllTraps>
<OIDProps>$TemplateConfig/OIDProps$</OIDProps>
<EventOriginId>$TemplateConfig/EventOriginId$</EventOriginId>
<PublisherId>$TemplateConfig/PublisherId$</PublisherId>
<PublisherName>$TemplateConfig/PublisherName$</PublisherName>
<Channel>$TemplateConfig/Channel$</Channel>
<LoggingComputer>$TemplateConfig/LoggingComputer$</LoggingComputer>
<EventNumber>$TemplateConfig/EventNumber$</EventNumber>
<EventCategory>$TemplateConfig/EventCatogory$</EventCategory>
<EventLevel>$TemplateConfig/EventLevel$</EventLevel>
<UserName>$TemplateConfig/UserName$</UserName>
<Params>$TemplateConfig/Params$</Params>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="Alert" TypeID="$Reference/Health$System.Health.GenerateAlert">
<Priority>$TemplateConfig/Priority$</Priority>
<Severity>$TemplateConfig/Severity$</Severity>
<AlertName>$TemplateConfig/AlertName$</AlertName>
<AlertDescription>$TemplateConfig/AlertDescription$</AlertDescription>
<AlertOwner>$TemplateConfig/AlertOwner$</AlertOwner>
<Suppression>$TemplateConfig/Suppression$</Suppression>
<Custom1>$TemplateConfig/Custom1$</Custom1>
<Custom2>$TemplateConfig/Custom2$</Custom2>
<Custom3>$TemplateConfig/Custom3$</Custom3>
<Custom4>$TemplateConfig/Custom4$</Custom4>
<Custom5>$TemplateConfig/Custom5$</Custom5>
<Custom6>$TemplateConfig/Custom6$</Custom6>
<Custom7>$TemplateConfig/Custom7$</Custom7>
<Custom8>$TemplateConfig/Custom8$</Custom8>
<Custom9>$TemplateConfig/Custom9$</Custom9>
<Custom10>$TemplateConfig/Custom10$</Custom10>
</WriteAction>
</WriteActions>
</Rule>
</Rules>
</Monitoring>
<LanguagePacks>
<LanguagePack ID="$TemplateConfig/LocaleID$" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="$TemplateConfig/ID$">
<Name>$TemplateConfig/Name$</Name>
<Description>$TemplateConfig/Description$</Description>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</Implementation>
</Template>