WS-Man Enumeration Shell Script Three-state Monitor

Microsoft.Oss.ShellScript.Status.ThreeState.MonitorType (UnitMonitorType)

Element properties:

RunAsDefault
AccessibilityPublic
Support Monitor RecalculateTrue

Member Modules:

ID Module Type TypeId RunAs 
InvokeDS DataSource Microsoft.Oss.TimedShellScript.DataSource Default
InvokeProbe ProbeAction Microsoft.Oss.ShellScript.ProbeAction Default
CDStatusError ConditionDetection System.ExpressionFilter Default
CDStatusOK ConditionDetection System.ExpressionFilter Default
CDStatusWarning ConditionDetection System.ExpressionFilter Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
Intervalint$Config/Interval$IntervalInterval in seconds
WarningStatusstring$Config/WarningStatus$Warning StatusWarning Status Condition
ErrorStatusstring$Config/ErrorStatus$Error StatusError Status Condition
Timeoutint$Config/Timeout$Timeout in Seconds

Source Code:

<UnitMonitorType ID="Microsoft.Oss.ShellScript.Status.ThreeState.MonitorType" Accessibility="Public">
<MonitorTypeStates>
<MonitorTypeState ID="StatusOK" NoDetection="false"/>
<MonitorTypeState ID="StatusWarning" NoDetection="false"/>
<MonitorTypeState ID="StatusError" NoDetection="false"/>
</MonitorTypeStates>
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Interval" type="xsd:unsignedInt" minOccurs="1"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TargetSystem" type="xsd:string" minOccurs="1"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Script" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ScriptArgs" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Timeout" type="xsd:integer"/>
<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" maxOccurs="1" minOccurs="0"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WarningStatus" type="xsd:string" minOccurs="1"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ErrorStatus" type="xsd:string" minOccurs="1"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="Interval" Selector="$Config/Interval$" ParameterType="int"/>
<OverrideableParameter ID="WarningStatus" Selector="$Config/WarningStatus$" ParameterType="string"/>
<OverrideableParameter ID="ErrorStatus" Selector="$Config/ErrorStatus$" ParameterType="string"/>
<OverrideableParameter ID="Timeout" Selector="$Config/Timeout$" ParameterType="int"/>
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource ID="InvokeDS" TypeID="Microsoft.Oss.TimedShellScript.DataSource">
<Interval>$Config/Interval$</Interval>
<TargetSystem>$Config/TargetSystem$</TargetSystem>
<ShellScript>$Config/Script$</ShellScript>
<ScriptArguments>$Config/ScriptArgs$</ScriptArguments>
<Timeout>$Config/Timeout$</Timeout>
<UserName>$Config/UserName$</UserName>
<Password>$Config/Password$</Password>
</DataSource>
<ProbeAction ID="InvokeProbe" TypeID="Microsoft.Oss.ShellScript.ProbeAction">
<TargetSystem>$Config/TargetSystem$</TargetSystem>
<ShellScript>$Config/Script$</ShellScript>
<ScriptArguments>$Config/ScriptArgs$</ScriptArguments>
<Timeout>$Config/Timeout$</Timeout>
<UserName>$Config/UserName$</UserName>
<Password>$Config/Password$</Password>
</ProbeAction>
<ConditionDetection ID="CDStatusOK" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>//*[local-name()="StdOut"]</XPathQuery>
</ValueExpression>
<Operator>DoesNotMatchRegularExpression</Operator>
<Pattern>$Config/WarningStatus$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>//*[local-name()="StdOut"]</XPathQuery>
</ValueExpression>
<Operator>DoesNotMatchRegularExpression</Operator>
<Pattern>$Config/ErrorStatus$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>//*[local-name()="StdErr"]</XPathQuery>
</ValueExpression>
<Operator>DoesNotMatchRegularExpression</Operator>
<Pattern>$Config/WarningStatus$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>//*[local-name()="StdErr"]</XPathQuery>
</ValueExpression>
<Operator>DoesNotMatchRegularExpression</Operator>
<Pattern>$Config/ErrorStatus$</Pattern>
</RegExExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<ConditionDetection ID="CDStatusError" TypeID="System!System.ExpressionFilter">
<Expression>
<Or>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>//*[local-name()="StdOut"]</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>$Config/ErrorStatus$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>//*[local-name()="StdErr"]</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>$Config/ErrorStatus$</Pattern>
</RegExExpression>
</Expression>
</Or>
</Expression>
</ConditionDetection>
<ConditionDetection ID="CDStatusWarning" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<Or>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>//*[local-name()="StdOut"]</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>$Config/WarningStatus$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>//*[local-name()="StdErr"]</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>$Config/WarningStatus$</Pattern>
</RegExExpression>
</Expression>
</Or>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>//*[local-name()="StdOut"]</XPathQuery>
</ValueExpression>
<Operator>DoesNotMatchRegularExpression</Operator>
<Pattern>$Config/ErrorStatus$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>//*[local-name()="StdErr"]</XPathQuery>
</ValueExpression>
<Operator>DoesNotMatchRegularExpression</Operator>
<Pattern>$Config/ErrorStatus$</Pattern>
</RegExExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="StatusOK">
<Node ID="CDStatusOK">
<Node ID="InvokeDS"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="StatusWarning">
<Node ID="CDStatusWarning">
<Node ID="InvokeDS"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="StatusError">
<Node ID="CDStatusError">
<Node ID="InvokeDS"/>
</Node>
</RegularDetection>
</RegularDetections>
<OnDemandDetections>
<OnDemandDetection MonitorTypeStateID="StatusOK">
<Node ID="CDStatusOK">
<Node ID="InvokeProbe"/>
</Node>
</OnDemandDetection>
<OnDemandDetection MonitorTypeStateID="StatusWarning">
<Node ID="CDStatusWarning">
<Node ID="InvokeProbe"/>
</Node>
</OnDemandDetection>
<OnDemandDetection MonitorTypeStateID="StatusError">
<Node ID="CDStatusError">
<Node ID="InvokeProbe"/>
</Node>
</OnDemandDetection>
</OnDemandDetections>
</MonitorImplementation>
</UnitMonitorType>