AddOn.UnixLogFile.EGREP.AlertRule.Template.PageSet (UIPageSet)

Element properties:

Type DefinitionAddOn.UnixLogFile.EGREP.AlertRule.Template

Source Code:

<UIPageSet ID="AddOn.UnixLogFile.EGREP.AlertRule.Template.PageSet" TypeDefinitionID="AddOn.UnixLogFile.EGREP.AlertRule.Template">
<UIPageReferences>
<UIPageReference ID="AddOn.UnixLogFile.EGREP.AlertRule.Template.PageSet.Reference1" PageID="RuleTemplates!Microsoft.SystemCenter.RuleTemplates.RuleGeneralPage" Usage="CreationOnly">
<InputTransform>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="Category">
<xsl:copy>Alert</xsl:copy>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
</InputTransform>
</UIPageReference>
<UIPageReference ID="AddOn.UnixLogFile.EGREP.AlertRule.Template.PageSet.Reference2" PageID="System!System.SimpleSchedulerPage" Usage="CreationOnly">
<InputTransform>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="SimpleReccuringSchedule">
<xsl:element name="Interval"><xsl:attribute name="Unit">Minutes</xsl:attribute>15
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
</InputTransform>
</UIPageReference>
<!--<UIPageReference ID="AddOn.UnixLogFile.GREP.AlertRule.Template.PageSet.Reference3" PageID="MUSL!Microsoft.Unix.ShellCommandDetailsPage" Usage="CreationOnly">
<Title ID="AddOn.UnixLogFile.GREP.AlertRule.Template.PageSet.Reference3.Title" />
<SubTitle ID="AddOn.UnixLogFile.GREP.AlertRule.Template.PageSet.Reference3.SubTitle" />
</UIPageReference>-->
<UIPageReference ID="AddOn.UnixLogFile.EGREP.AlertRule.Template.PageSet.Reference3" PageID="MUSL!Microsoft.Unix.ScriptDetailsPage" Usage="CreationOnly">
<Title ID="AddOn.UnixLogFile.EGREP.AlertRule.Template.PageSet.Reference3.Title"/>
<SubTitle ID="AddOn.UnixLogFile.EGREP.AlertRule.Template.PageSet.Reference3.SubTitle"/>
</UIPageReference>
<UIPageReference ID="AddOn.UnixLogFile.EGREP.AlertRule.Template.PageSet.Reference4" PageID="Health!System.Health.GenerateAlertModuleConfigPage" Usage="CreationOnly">
<InputParameters>
<DataType>MSWL!Microsoft.SystemCenter.WSManagement.WSManData</DataType>
</InputParameters>
</UIPageReference>
</UIPageReferences>
<OutputTransform>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="Configuration">
<xsl:copy-of select="/ID"/>
<xsl:copy-of select="/Name"/>
<xsl:copy-of select="/Description[1]"/>
<xsl:copy-of select="/Target"/>
<xsl:element name="TargetSystem">
<xsl:variable name="MPAlias" select="/UnixLibraryAlias"/>
<xsl:variable name="HostReference" select="/TargetHosted"/>
<xsl:value-of select="concat('$Target/',$HostReference,'Property[Type=','&quot;',$MPAlias,'!Microsoft.Unix.Computer','&quot;',']/NetworkName$')"/>
</xsl:element>
<!--<xsl:element name="TargetSystem">
<xsl:variable name="MPAlias" select="/UnixLibraryAlias" />
<xsl:choose>
<xsl:when test="/TargetHosted='true'">
<xsl:value-of select="concat('$Target/Host/Property[Type=','&quot;',$MPAlias,'!Microsoft.Unix.Computer','&quot;',']/NetworkName$')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('$Target/Property[Type=','&quot;',$MPAlias,'!Microsoft.Unix.Computer','&quot;',']/NetworkName$')" />
</xsl:otherwise>
</xsl:choose>
</xsl:element>-->
<xsl:copy-of select="/Category"/>
<xsl:copy-of select="/LocaleId"/>
<xsl:element name="ErrorCode">
<xsl:variable name="ErrorCode" select="substring-before(/ScriptArgs,' /log:')"/>
<xsl:value-of select="$ErrorCode"/>
</xsl:element>
<xsl:element name="LogFilePattern">
<xsl:variable name="LogFilePattern" select="substring-before(substring-after(/ScriptArgs,' /log:'),' /temp:')"/>
<xsl:value-of select="$LogFilePattern"/>
</xsl:element>
<xsl:element name="TempFolder">
<xsl:variable name="TempFolder" select="substring-after(/ScriptArgs,' /temp:')"/>
<xsl:value-of select="$TempFolder"/>
</xsl:element>
<!--<xsl:element name="ErrorCode">
<xsl:variable name="ErrorCode" select="substring-before(/ScriptArgs,' /')" />
<xsl:value-of select="$ErrorCode" />
</xsl:element>
<xsl:element name="LogFilePattern">
<xsl:variable name="LogFilePattern" select="concat('/',substring-before(substring-after(/ScriptArgs,' /'),' /'))" />
<xsl:value-of select="$LogFilePattern" />
</xsl:element>
<xsl:element name="TempFolder">
<xsl:variable name="TempFolder" select="concat('/',substring-after(substring-after(/ScriptArgs,' /'),' /'))" />
<xsl:value-of select="$TempFolder" />
</xsl:element>-->
<xsl:element name="UserName">
<xsl:variable name="SelectedProfile" select="/RunAsProfile"/>
<xsl:variable name="MPAlias" select="/UnixLibraryAlias"/>
<xsl:value-of select="concat('$RunAs[Name=','&quot;',$MPAlias,'!',$SelectedProfile,'&quot;',']/UserName$')"/>
</xsl:element>
<!--
Construct RunAs Password reference from MP Alias for the Unix Library MP and the Run As profile name.
For the Rule & Task templates, this could be done with a Template $Reference variable, but it is used consistently
for all templates in this MP, and monitor templates cannot use that convention.
-->
<xsl:element name="Password">
<xsl:variable name="SelectedProfile" select="/RunAsProfile"/>
<xsl:variable name="MPAlias" select="/UnixLibraryAlias"/>
<xsl:value-of select="concat('$RunAs[Name=','&quot;',$MPAlias,'!',$SelectedProfile,'&quot;',']/Password$')"/>
</xsl:element>
<xsl:element name="Frequency">
<xsl:variable name="RawInterval" select="/SimpleReccuringSchedule/Interval"/>
<xsl:variable name="Units" select="/SimpleReccuringSchedule/Interval/@Unit"/>
<xsl:choose>
<xsl:when test="not(boolean($Units)) or $Units='Seconds'">
<xsl:value-of select="$RawInterval"/>
</xsl:when>
<xsl:when test="$Units='Minutes'">
<xsl:value-of select="$RawInterval*60"/>
</xsl:when>
<xsl:when test="$Units='Hours'">
<xsl:value-of select="$RawInterval*3600"/>
</xsl:when>
<xsl:when test="$Units='Days'">
<xsl:value-of select="$RawInterval*86400"/>
</xsl:when>
</xsl:choose>
</xsl:element>
<xsl:element name="Timeout">
<xsl:variable name="Timeout" select="/TimeOut"/>
<xsl:value-of select="$Timeout"/>
</xsl:element>
<xsl:copy-of select="/Enabled"/>
<xsl:copy-of select="/Priority"/>
<xsl:copy-of select="/Severity"/>
<xsl:copy-of select="/AlertName"/>
<xsl:copy-of select="/AlertDescription"/>
<xsl:copy-of select="/AlertOwner"/>
<xsl:copy-of select="/AlertParameters"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
</OutputTransform>
</UIPageSet>