Supervisión de rendimiento de aplicaciones JEE

Microsoft.JEE.Templates.Application.Performance (Template)

Esta plantilla permite crear un monitor de rendimiento que se basa en un MBean de extensión de administración de Java (JMX).

Source Code:

<Template ID="Microsoft.JEE.Templates.Application.Performance">
<!-- These are the values that get collected from the user when they run the template wizard -->
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="UserDisplayName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="UserDisplayDescription" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Xpath" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="OpsMgrName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TargetApplicationName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="MBeanAction" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="JMXQuery" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="AdditionalArguments" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="RequestBody" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="IntervalSeconds" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeoutSeconds" type="xsd:string"/>
</Configuration>
<!-- MPs that the generated template MP will reference -->
<References>
<Reference ID="SC"/>
<Reference ID="SCDW"/>
<Reference ID="JEE"/>
</References>
<!--
The implementation is the output of the template. OpsMgr replaces all the $TemplateConfig/Variable$ declarations
with the values collected from the user, saves it to a management pack, and imports it.
-->
<Implementation>
<TypeDefinitions>
<EntityTypes>
<ClassTypes>
<!-- create new class for app, so that the monitors/rules are only created for this class -->
<ClassType ID="Microsoft.JEE.Templates.Performance.$TemplateConfig/MBeanAction$.$TemplateConfig/OpsMgrName$.Application" Hosted="true" Accessibility="Public" Abstract="false" Base="$Reference/JEE$Microsoft.JEE.Application"/>
</ClassTypes>
</EntityTypes>
</TypeDefinitions>
<Monitoring>
<Discoveries>
<!-- Discover Extended Template-specific Application -->
<Discovery ID="Microsoft.JEE.Template.Performance.$TemplateConfig/MBeanAction$.$TemplateConfig/OpsMgrName$.Application.Discovery" Target="$Reference/JEE$Microsoft.JEE.Application" Remotable="true" Enabled="true">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.JEE.Templates.Performance.$TemplateConfig/MBeanAction$.$TemplateConfig/OpsMgrName$.Application"/>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="$Reference/JEE$Microsoft.JEE.Templates.Application.Extended.Discovery.DataSource">
<ClassId>$MPElement[Name="Microsoft.JEE.Templates.Performance.$TemplateConfig/MBeanAction$.$TemplateConfig/OpsMgrName$.Application"]$</ClassId>
<ApplicationServerId>$Target/Host/Property[Type="$Reference/JEE$Microsoft.JEE.ApplicationServer.Monitored.Instance"]/Id$</ApplicationServerId>
<PrincipalName>$Target/Host/Property[Type="$Reference/JEE$Microsoft.JEE.ApplicationServer.Monitored.Instance"]/HostName$</PrincipalName>
<TargetApplicationName>$TemplateConfig/TargetApplicationName$</TargetApplicationName>
<ApplicationName>$Target/Property[Type="$Reference/JEE$Microsoft.JEE.Application"]/ApplicationName$</ApplicationName>
<DisplayName>$Target/Property[Type="$Reference/JEE$Microsoft.JEE.Application"]/ApplicationName$</DisplayName>
<ObjectName>$Target/Property[Type="$Reference/JEE$Microsoft.JEE.Application"]/ObjectName$</ObjectName>
<j2eeType>$Target/Property[Type="$Reference/JEE$Microsoft.JEE.Application"]/j2eeType$</j2eeType>
<IntervalSeconds>14400</IntervalSeconds>
</DataSource>
</Discovery>
</Discoveries>
<Rules>
<Rule ID="Microsoft.JEE.Application.Performance.$TemplateConfig/OpsMgrName$" Target="Microsoft.JEE.Templates.Performance.$TemplateConfig/MBeanAction$.$TemplateConfig/OpsMgrName$.Application" Enabled="true" Remotable="true">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="$Reference/JEE$Microsoft.JEE.MBean.Template.$TemplateConfig/MBeanAction$.DataSource">
<ComputerName>$Target/Host/Property[Type="$Reference/JEE$Microsoft.JEE.ApplicationServer.Monitored.Instance"]/HostName$</ComputerName>
<Protocol>$Target/Host/Property[Type="$Reference/JEE$Microsoft.JEE.ApplicationServer.Monitored.Instance"]/Protocol$</Protocol>
<Port>$Target/Host/Property[Type="$Reference/JEE$Microsoft.JEE.ApplicationServer.Monitored.Instance"]/Port$</Port>
<BaseURL/>
<JMXQuery>$TemplateConfig/JMXQuery$</JMXQuery>
<AdditionalArguments>$TemplateConfig/AdditionalArguments$</AdditionalArguments>
<RequestBody>$TemplateConfig/RequestBody$</RequestBody>
<IntervalSeconds>$TemplateConfig/IntervalSeconds$</IntervalSeconds>
<TimeoutSeconds>$TemplateConfig/TimeoutSeconds$</TimeoutSeconds>
</DataSource>
</DataSources>
<ConditionDetection TypeID="$Reference/JEE$Microsoft.JEE.Performance.DataGenericMapper" ID="PerfMapper">
<ObjectName>$TemplateConfig/UserDisplayName$</ObjectName>
<CounterName>$TemplateConfig/UserDisplayDescription$</CounterName>
<InstanceName/>
<Value>$Data/$TemplateConfig/Xpath$$</Value>
</ConditionDetection>
<WriteActions>
<WriteAction ID="WriteToDB" TypeID="$Reference/SC$Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="WriteToDW" TypeID="$Reference/SCDW$Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>
</Rules>
</Monitoring>
<LanguagePacks>
<LanguagePack ID="ENU" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="Microsoft.JEE.Template.Performance.$TemplateConfig/MBeanAction$.$TemplateConfig/OpsMgrName$.Application.Discovery">
<Name>$TemplateConfig/UserDisplayName$ Template Application Extension</Name>
<Description>Discovery of a specialized template class for $TemplateConfig/UserDisplayName$ from the JEE Template Library Management Pack.</Description>
</DisplayString>
<DisplayString ElementID="Microsoft.JEE.Templates.Performance.$TemplateConfig/MBeanAction$.$TemplateConfig/OpsMgrName$.Application">
<Name>$TemplateConfig/UserDisplayName$ extension of Microsoft.JEE.Application</Name>
<Description>$TemplateConfig/UserDisplayName$-specific extension to Microsoft.JEE.Application to limit targeting of the template availabilty unit-monitor.</Description>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</Implementation>
</Template>