UNIX/Linux Shell Command (Performance)

Microsoft.Unix.ShellCommand.PerfRule.Template (Template)

Collect performance data from a UNIX/Linux shell command.

Source Code:

<Template ID="Microsoft.Unix.ShellCommand.PerfRule.Template" Purpose="RuleCreation">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
<SchemaType>SystemHealth!System.Health.AlertSchema</SchemaType>
<SchemaType>RuleTemplates!Microsoft.SystemCenter.RuleTemplates.ManagementPackCategoryType</SchemaType>
<SchemaType>RuleTemplates!Microsoft.SystemCenter.RuleTemplates.ManagementPackIdentifiers</SchemaType>
</IncludeSchemaTypes>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ID" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Name" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Description" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Target" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TargetSystem" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Category" type="ManagementPackCategoryType"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="LocaleId" type="ManagementPackLanguageIdentifier"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Command" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="UserName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Password" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeOut" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeOutInMS" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Interval" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SyncTime" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Enabled" type="xsd:boolean"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Expression" type="ExpressionType" minOccurs="0"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ObjectName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="InstanceName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CounterName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Value" type="xsd:string"/>
</Configuration>
<References>
<Reference ID="System"/>
<Reference ID="SC"/>
<Reference ID="SCDW"/>
<Reference ID="SystemPerf"/>
<Reference ID="SystemHealth"/>
<Reference ID="Unix"/>
<Reference ID="Self"/>
</References>
<Implementation>
<Monitoring>
<Rules>
<Rule ID="$TemplateConfig/ID$" Target="$TemplateConfig/Target$" Enabled="$TemplateConfig/Enabled$">
<Category>$TemplateConfig/Category$</Category>
<DataSources>
<DataSource ID="InvokeDS" TypeID="$Reference/Self$Microsoft.Unix.ShellCommand.Invoke.DataSource">
<Interval>$TemplateConfig/Interval$</Interval>
<SyncTime>$TemplateConfig/SyncTime$</SyncTime>
<TargetSystem>$TemplateConfig/TargetSystem$</TargetSystem>
<UserName>$TemplateConfig/UserName$</UserName>
<Password>$TemplateConfig/Password$</Password>
<ShellCommand>$TemplateConfig/Command$</ShellCommand>
<TimeOut>$TemplateConfig/TimeOut$</TimeOut>
<TimeOutInMS>$TemplateConfig/TimeOutInMS$</TimeOutInMS>
<FilterExpression>$TemplateConfig/Expression$</FilterExpression>
</DataSource>
</DataSources>
<ConditionDetection ID="PerfMapper" TypeID="$Reference/SystemPerf$System.Performance.DataGenericMapper">
<ObjectName>$TemplateConfig/ObjectName$</ObjectName>
<CounterName>$TemplateConfig/CounterName$</CounterName>
<InstanceName>$TemplateConfig/InstanceName$</InstanceName>
<Value>$TemplateConfig/Value$</Value>
</ConditionDetection>
<WriteActions>
<WriteAction ID="PerfWriteToDB" TypeID="$Reference/SC$Microsoft.SystemCenter.CollectPerformanceData"/>
<WriteAction ID="PerfWriteToDW" TypeID="$Reference/SCDW$Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData"/>
</WriteActions>
</Rule>
</Rules>
</Monitoring>
<Presentation>
<StringResources>
<StringResource ID="$TemplateConfig/ID$.AlertMessage"/>
</StringResources>
</Presentation>
<LanguagePacks>
<LanguagePack ID="$TemplateConfig/LocaleId$" IsDefault="true">
<DisplayStrings>
<DisplayString ElementID="$TemplateConfig/ID$">
<Name>$TemplateConfig/Name$</Name>
<Description>$TemplateConfig/Description$</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/ID$.AlertMessage">
<Name>$TemplateConfig/AlertName$</Name>
<Description>$TemplateConfig/AlertDescription$</Description>
</DisplayString>
</DisplayStrings>
</LanguagePack>
</LanguagePacks>
</Implementation>
</Template>