This reference describes Unit Monitor Types in the UNIX/Linux Authoring Library example Management Pack.
ID
Unix.Authoring.WSManEnumeration.ProcessCount.MonitorType
Description
A monitor type that monitors the count of running instances of specified process, with optional argument filtering.
Type
Two-State
Data Source
Microsoft.Unix.Process.Library!Microsoft.Unix.WSMan.ProcessEnumerator
Configuration
Parameter
Interval
Integer
The frequency interval, in seconds, at which the data source will run.
TargetSystem
String
The target system for the monitor. Typically: $Target/#HostReferences#/Property[Type="#Unix Library Alias#!Microsoft.Unix.Computer"]/NetworkName$
ProcessName
The name of the process to monitor
Arguments FilterExpression
An optional Regular Expression that can be used to distinguish between multiple instances of processes with the same name. The process arguments of the processes with a name matching ProcessName are evaluated against this Regular Expression. Only processes with arguments that match the Regular Expression are evaluated by the monitor.
Min
ProcessCount
The minimum count of running processes. If the count of processes matching the ProcessName and Arguments Filter Expression is less than this value, the monitor will be set to an Error state.
Max ProcessCount
The maximum count of running processes. If the count of processes matching the ProcessName and Arguments Filter Expression is greater than this value, the monitor will be set to an Error state.
Example
<UnitMonitor ID="MyMP.MyProcessMonitor.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.WSManEnumeration.ProcessCount.MonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="MyMP.MyProcessMonitor.Monitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>
$Target/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$
</AlertParameter1>
<AlertParameter2>$Data/Context///*[local-name()="Count"]$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ProcessCountOK" MonitorTypeStateID="ProcessCountOK" HealthState="Success" />
<OperationalState ID="ProcessCountError" MonitorTypeStateID="ProcessCountError" HealthState="Error" />
</OperationalStates>
<Configuration>
<Interval>300</Interval>
<TargetSystem>
</TargetSystem>
<ProcessName>mydaemon</ProcessName>
<ArgumentsFilterExpression></ArgumentsFilterExpression>
<MinProcessCount>1</MinProcessCount>
<MaxProcessCount>5</MaxProcessCount>
</Configuration>
</UnitMonitor>
Unix.Authoring.ShellCommand.MatchesRegExp.TwoState.MonitorType
A monitor type that runs a shell command through a WS-Management invocation, and evaluates the StdOut value against a Regular Expression to determine health state.
Unix.Authoring.TimedShellCommand.DataSource
ShellCommand
The “shell command” to execute on the remote host. See the Appendix section for discussion of quotes and special characters.
Timeout
Timeout (in seconds). If the command runs for longer than the timeout, its process is stopped without waiting for completion.
UserName
The Run As reference providing the UserName of the user that will run the command/script. $RunAs[Name="#MP Alias#!#Profile Name"]/UserName$
Password
The Run As reference providing the Password of the user that will run the command/script. $RunAs[Name="#MP Alias#!#Profile Name"]/Password$
FilterExpression
Expression Type
An optional Expression that can be used for workflow filtering. If an expression is provided, the workflow will be dropped (before evaluating the monitoring state) if the expression is not matched. This is useful for error-handling.
ErrorRegExp
A Regular Expression that is compared to the StdOut of the shell command. If the ErrorRegExp expression is matched, the monitor is set to an Error state. If the ErrorRegExp expression is not matched, the monitor is set to a Healthy state.
<UnitMonitor ID="MyMP.ShellCommand.Expression.TwoState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellCommand.MatchesRegExp.TwoState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellCommand.Expression.TwoState.Monitor.AlertMessage">
<AlertParameter2>$Data/Context///*[local-name()="StdOut"]$</AlertParameter2>
<OperationalState ID="StatusOK" MonitorTypeStateID="StatusOK" HealthState="Success" />
<OperationalState ID="StatusError" MonitorTypeStateID="StatusError" HealthState="Error" />
<ShellCommand>echo 'Error'</ShellCommand>
<Timeout>60</Timeout>
<UserName>$RunAs[Name="Unix!Microsoft.Unix.ActionAccount"]/UserName$</UserName>
<Password>$RunAs[Name="Unix!Microsoft.Unix.ActionAccount"]/Password$</Password>
<ErrorRegExp>^Error</ErrorRegExp>
Unix.Authoring.ShellCommand.MatchesRegExp.ThreeState.MonitorType
A monitor type that runs a shell command through a WS-Management invocation, and evaluates the StdOut value against Regular Expressions to determine health state.
Three-State
A Regular Expression that is compared to the StdOut of the shell command. If the ErrorRegExp expression is matched, the monitor is set to an Error state. If the ErrorRegExp and WarningRegExp expressions are not matched, the monitor is set to a Healthy state.
WarningRegExp
A Regular Expression that is compared to the StdOut of the shell command. If the WarningRegExp expression is matched, the monitor is set to a Warning state. If the ErrorRegExp and WarningRegExp expressions are not matched, the monitor is set to a Healthy state.
<UnitMonitor ID="MyMP.ShellCommand.Expression.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellCommand.MatchesRegExp.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellCommand.Expression.ThreeState.Monitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<OperationalState ID="StatusWarning" MonitorTypeStateID="StatusWarning" HealthState="Warning" />
<ShellCommand>echo 'Warning'</ShellCommand>
<WarningRegExp>^Warning</WarningRegExp>
Unix.Authoring.ShellCommand.LessThanThreshold.ThreeState.MonitorType
A monitor type that runs a shell command through a WS-Management invocation, and evaluates the StdOut value against numeric warning and error threshold values. For use in monitoring command output with numeric data, where errors are indicated by values lower than a threshold.
Warning Threshold
Double
The threshold for the Warning state. If the value of StdOut is less than this threshold, but greater than the Error Threshold, the monitor will be set to a Warning state. If the value is greater than the Warning Threshold, the monitor will be set to a Healthy state
Error Threshold
The threshold for the Error state. If the value of StdOut is less than this threshold, the monitor will be set to an Error state.
<UnitMonitor ID="MyMP.ShellCommand.LessThan.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellCommand.LessThanThreshold.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellCommand.LessThan.ThreeState.Monitor.AlertMessage">
<ShellCommand>echo 75</ShellCommand>
<FilterExpression>
<RegExExpression>
<ValueExpression>
<XPathQuery>//*[local-name()="StdOut"]</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^[-+]?\d*[0-9]*(\.[0-9]+)?[Ee]?[-+]?[0-9]*$</Pattern>
</RegExExpression>
</FilterExpression>
<WarningThreshold>100</WarningThreshold>
<ErrorThreshold>50</ErrorThreshold>
Unix.Authoring.ShellCommand.GreaterThanThreshold.ThreeState.MonitorType
A monitor type that runs a shell command through a WS-Management invocation, and evaluates the StdOut value against numeric warning and error threshold values. For use in monitoring command output with numeric data, where errors are indicated by values higher than a threshold.
The threshold for the Warning state. If the value of StdOut is greater than this threshold, but less than the Error Threshold, the monitor will be set to a Warning state. If the value is less than the Warning Threshold, the monitor will be set to a Healthy state
The threshold for the Error state. If the value of StdOut is greater than this threshold, the monitor will be set to an Error state.
<UnitMonitor ID="MyMP.ShellCommand.GreaterThan.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellCommand.GreaterThanThreshold.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellCommand.GreaterThan.ThreeState.Monitor.AlertMessage">
<ShellCommand>echo 102</ShellCommand>
<WarningThreshold>50</WarningThreshold>
<ErrorThreshold>100</ErrorThreshold>
Unix.Authoring.ShellCommand.PropertyBag.MatchesRegExp.TwoState.MonitorType
A monitor type that runs a shell command through a WS-Management invocation, and passes the output to a Microsoft.Windows.PowerShellPropertyBagProbe probe action. The PowerShell Property Bag probe can be used to parse and manipulate output from the shell command. The specified value in the Property Bag is evaluated against a Regular Expression to determine health state.
Unix.Authoring.TimedShellCommand.PropertyBag.DataSource
PSScriptName
The name given to the PowerShell script
PSScriptBody
The body of the PowerShell script. In order to reference output from the shell command, the script must start with: param([string]$StdOut,[string]$StdErr,[string]$ReturnCode)
The PowerShell script should return one or more Property Bags, using syntax such as: $api = New-Object -comObject 'MOM.ScriptAPI'
$bag = $api.CreatePropertyBag()
$bag.AddValue("Name","Value")
$bag
ValueXPath
An XPath query that identifies the value of the returned Property Bag to evaluate for monitoring. For example, the following XPath evaluates the property with the name MyProperty: Property[@Name='MyProperty']
A Regular Expression that is compared to the value specified by ValueXPath. If the ErrorRegExp expression is matched, the monitor is set to an Error state. If the ErrorRegExp expression is not matched, the monitor is set to a Healthy state.
<UnitMonitor ID="MyMP.ShellCommand.PropertyBag.Expression.TwoState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellCommand.PropertyBag.MatchesRegExp.TwoState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellCommand.PropertyBag.Expression.TwoState.Monitor.AlertMessage">
<AlertParameter2>$Data/Context/DataItem/Property[@Name='PropertyValue']$</AlertParameter2>
<ShellCommand>echo 'MyPropertyA:Error,MyPropertyB:OK'</ShellCommand>
<PSScriptName>MyPSScript.ps1</PSScriptName>
<PSScriptBody>
<![CDATA[
param([string]$StdOut,[string]$StdErr,[string]$ReturnCode)
$api = New-Object -comObject 'MOM.ScriptAPI'
[array]$arCounters=$StdOut.Split(",")
ForEach($counter in $ArCounters){
$sName=$counter.Split(":")[0]
$sValue=$counter.split(":")[1].trim()
if ($sValue -ne $null){
$bag.AddValue("PropertyName",$sName)
$bag.AddValue("PropertyValue",$sValue)
}
]]>
</PSScriptBody>
<XPathQuery>Property[@Name='PropertyName']</XPathQuery>
<Pattern>MyPropertyA</Pattern>
<ValueXPath>Property[@Name='PropertyValue']</ValueXPath>
Unix.Authoring.ShellCommand.PropertyBag.MatchesRegExp.ThreeState.MonitorType
A monitor type that runs a shell command through a WS-Management invocation, and passes the output to a Microsoft.Windows.PowerShellPropertyBagProbe probe action. The PowerShell Property Bag probe can be used to parse and manipulate output from the shell command. The specified value in the Property Bag is evaluated against Regular Expressions to determine health state.
A Regular Expression that is compared to the value specified by ValueXPath. If the ErrorRegExp expression is matched, the monitor is set to an Error state. If the ErrorRegExp and WarningRegExp expressions are not matched, the monitor is set to a Healthy state.
A Regular Expression that is compared to the value specified by ValueXPath. If the WarningRegExp expression is matched, the monitor is set to an Warning state. If the ErrorRegExp and WarningRegExp expressions are not matched, the monitor is set to a Healthy state.
<UnitMonitor ID="MyMP.ShellCommand.PropertyBag.Expression.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellCommand.PropertyBag.MatchesRegExp.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellCommand.PropertyBag.Expression.ThreeState.Monitor.AlertMessage">
<ShellCommand>echo 'MyPropertyA:Warning,MyPropertyB:OK'</ShellCommand>
Unix.Authoring.ShellCommand.PropertyBag.LessThanThreshold.ThreeState.MonitorType
A monitor type that runs a shell command through a WS-Management invocation, and passes the output to a Microsoft.Windows.PowerShellPropertyBagProbe probe action. The PowerShell Property Bag probe can be used to parse and manipulate output from the shell command. The specified value of the Property Bag is evaluated against numeric warning and error threshold values. For use in monitoring numeric values, where errors are indicated by values lower than a threshold.
The threshold for the Warning state. If the value specified by ValueXPath is lower than this threshold, but greater than the Error Threshold, the monitor will be set to a Warning state. If the value is greater than the Warning Threshold, the monitor will be set to a Healthy state
The threshold for the Error state. If the value specified by ValueXPath is lower than this threshold, the monitor will be set to an Error state.
<UnitMonitor ID="MyMP.ShellCommand.PropertyBag.LessThan.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellCommand.PropertyBag.LessThanThreshold.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellCommand.PropertyBag.LessThan.ThreeState.Monitor.AlertMessage">
<AlertParameter2>$Data/Context/DataItem/Property[@Name='CounterValue']$</AlertParameter2>
<ShellCommand>echo 'MyCounterA:88,MyCounterB:77'</ShellCommand>
$bag.AddValue("CounterName",$sName)
$bag.AddValue("CounterValue",$sValue)
<XPathQuery>Property[@Name='CounterName']</XPathQuery>
<Pattern>MyCounterA</Pattern>
<ValueXPath>Property[@Name='CounterValue']</ValueXPath>
Unix.Authoring.ShellCommand.PropertyBag.GreaterThanThreshold.ThreeState.MonitorType
A monitor type that runs a shell command through a WS-Management invocation, and passes the output to a Microsoft.Windows.PowerShellPropertyBagProbe probe action. The PowerShell Property Bag probe can be used to parse and manipulate output from the shell command. The specified value of the Property Bag is evaluated against numeric warning and error threshold values. For use in monitoring numeric values, where errors are indicated by values greater than a threshold.
The threshold for the Warning state. If the value specified by ValueXPath is greater than this threshold, but less than the Error Threshold, the monitor will be set to a Warning state. If the value is less than the Warning Threshold, the monitor will be set to a Healthy state
The threshold for the Error state. If the value specified by ValueXPath is greater than this threshold, the monitor will be set to an Error state.
<UnitMonitor ID="MyMP.ShellCommand.PropertyBag.GreaterThan.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellCommand.PropertyBag.GreaterThanThreshold.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellCommand.PropertyBag.GreaterThan.ThreeState.Monitor.AlertMessage">
Unix.Authoring.ShellScript.MatchesRegExp.TwoState.MonitorType
A monitor type that runs a shell script through a WS-Management invocation, and evaluates the StdOut value against a Regular Expression to determine health state.
Unix.Authoring.TimedShellScript.DataSource
ShellScript
The contents of the shell script to execute on the remote host.
ScriptArguments
Command line arguments to be passed to the script.
Timeout (in seconds). If the script runs for longer than the timeout, its process is stopped without waiting for completion.
A Regular Expression that is compared to the StdOut of the shell script. If the ErrorRegExp expression is matched, the monitor is set to an Error state. If the ErrorRegExp expression is not matched, the monitor is set to a Healthy state.
<UnitMonitor ID="MyMP.ShellScript.Expression.TwoState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellScript.MatchesRegExp.TwoState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellScript.Expression.TwoState.Monitor.AlertMessage">
<ShellScript>
echo $1
</ShellScript>
<ScriptArguments>Error</ScriptArguments>
Unix.Authoring.ShellScript.MatchesRegExp.ThreeState.MonitorType
A monitor type that runs a shell script through a WS-Management invocation, and evaluates the StdOut value against Regular Expressions to determine health state.
A Regular Expression that is compared to the StdOut of the shell script. If the ErrorRegExp expression is matched, the monitor is set to an Error state. If the ErrorRegExp and WarningRegExp expressions are not matched, the monitor is set to a Healthy state.
A Regular Expression that is compared to the StdOut of the shell script. If the WarningRegExp expression is matched, the monitor is set to a Warning state. If the ErrorRegExp and WarningRegExp expressions are not matched, the monitor is set to a Healthy state.
<UnitMonitor ID="MyMP.ShellScript.Expression.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellScript.MatchesRegExp.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellScript.Expression.ThreeState.Monitor.AlertMessage">
Unix.Authoring.ShellScript.LessThanThreshold.ThreeState.MonitorType
A monitor type that runs a shell script through a WS-Management invocation, and evaluates the StdOut value against numeric warning and error threshold values. For use in monitoring command output with numeric data, where errors are indicated by values lower than a threshold.
<UnitMonitor ID="MyMP.ShellScript.LessThan.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellScript.LessThanThreshold.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellScript.LessThan.ThreeState.Monitor.AlertMessage">
<ScriptArguments>75</ScriptArguments>
Unix.Authoring.ShellScript.GreaterThanThreshold.ThreeState.MonitorType
A monitor type that runs a shell script through a WS-Management invocation, and evaluates the StdOut value against numeric warning and error threshold values. For use in monitoring command output with numeric data, where errors are indicated by values greater than a threshold.
<UnitMonitor ID="MyMP.ShellScript.GreaterThan.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellScript.GreaterThanThreshold.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellScript.GreaterThan.ThreeState.Monitor.AlertMessage">
Unix.Authoring.ShellScript.PropertyBag.MatchesRegExp.TwoState.MonitorType
A monitor type that runs a shell script through a WS-Management invocation, and passes the output to a Microsoft.Windows.PowerShellPropertyBagProbe probe action. The PowerShell Property Bag probe can be used to parse and manipulate output from the shell script. The specified value in the Property Bag is evaluated against a Regular Expression to determine health state.
Unix.Authoring.TimedShellScript.PropertyBag.DataSource
The body of the PowerShell script. In order to reference output from the shell script, the script must start with: param([string]$StdOut,[string]$StdErr,[string]$ReturnCode)
<UnitMonitor ID="MyMP.ShellScript.PropertyBag.Expression.TwoState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellScript.PropertyBag.MatchesRegExp.TwoState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellScript.PropertyBag.Expression.TwoState.Monitor.AlertMessage">
echo "MyPropertyA:$1,MyPropertyB:$2"
<ScriptArguments>Error OK</ScriptArguments>
Unix.Authoring.ShellScript.PropertyBag.MatchesRegExp.ThreeState.MonitorType
A monitor type that runs a shell script through a WS-Management invocation, and passes the output to a Microsoft.Windows.PowerShellPropertyBagProbe probe action. The PowerShell Property Bag probe can be used to parse and manipulate output from the shell script. The specified value in the Property Bag is evaluated against Regular Expressions to determine health state.
<UnitMonitor ID="MyMP.ShellScript.PropertyBag.Expression.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellScript.PropertyBag.MatchesRegExp.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellScript.PropertyBag.Expression.ThreeState.Monitor.AlertMessage">
<ScriptArguments>Warning OK</ScriptArguments>
Unix.Authoring.ShellScript.PropertyBag.LessThanThreshold.ThreeState.MonitorType
A monitor type that runs a shell script through a WS-Management invocation, and passes the output to a Microsoft.Windows.PowerShellPropertyBagProbe probe action. The PowerShell Property Bag probe can be used to parse and manipulate output from the shell script The specified value of the Property Bag is evaluated against numeric warning and error threshold values. For use in monitoring numeric values, where errors are indicated by values lower than a threshold.
The threshold for the Warning state. If the value specified by ValueXPath is lower than this threshold, but greater than the Error Threshold, the monitor will be set to a Warning state. If the value is greater than the Warning Threshold, the monitor will be set to a Healthy state.
<UnitMonitor ID="MyMP.ShellScript.PropertyBag.LessThan.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellScript.PropertyBag.LessThanThreshold.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellScript.PropertyBag.LessThan.ThreeState.Monitor.AlertMessage">
echo "MyCounterA:$1,MyCounterB:$2"
<ScriptArguments>88 77</ScriptArguments>
Unix.Authoring.ShellScript.PropertyBag.GreaterThanThreshold.ThreeState.MonitorType
A monitor type that runs a shell script through a WS-Management invocation, and passes the output to a Microsoft.Windows.PowerShellPropertyBagProbe probe action. The PowerShell Property Bag probe can be used to parse and manipulate output from the shell script. The specified value of the Property Bag is evaluated against numeric warning and error threshold values. For use in monitoring numeric values, where errors are indicated by values greater than a threshold.
The threshold for the Warning state. If the value specified by ValueXPath is greater than this threshold, but less than the Error Threshold, the monitor will be set to a Warning state. If the value is less than the Warning Threshold, the monitor will be set to a Healthy state.
<UnitMonitor ID="MyMP.ShellScript.PropertyBag.GreaterThan.ThreeState.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.ShellScript.PropertyBag.GreaterThanThreshold.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.ShellScript.PropertyBag.GreaterThan.ThreeState.Monitor.AlertMessage">
Unix.Authoring.WSManEnumeration.MatchesRegExp.TwoState.MonitorType
A monitor type that performs a WS-Management Enumeration of a specified class (filtered by a specified instance name), and evaluates a specified property value against a Regular Expression to determine health state.
Microsoft.Unix.Library!Microsoft.Unix.WSMan.TimedEnumerator.Filtered
Uri
The URI of the CIM class to enumerate. For example, the URI to enumerate the SCX_FileSystem class is: http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_FileSystem?__cimnamespace=root/scx
WSManFilter
An optional filter for use in the WSMan enumeration, in the form of a CQL query. For example: select name from SCX_UnixProcess
InstanceXPath
An XPath query that identifies the value of the returned DataItem to compare against the provided InstanceName. This is used so that a monitor will only evaluate the state of a specific instance, when multiple instances are returned by the CIM class enumeration. For example, this InstanceXPath value would evaluate the “Name” property of an SCX_FileSystem instance: /DataItem/WsManData/*[local-name(.)='SCX_FileSystem']/*[local-name(.)='Name']
InstanceName
The value to compare with InstanceXPath for filtering. This is typically a property of the monitor Target. For example: $Target/Property[Type="Unix!Microsoft.Unix.LogicalDevice"]/DeviceID$
An XPath query that identifies the value of the returned DataItem to evaluate for monitoring. For example, the following XPath evaluates the PercentUsedInodes property of the SCX_FileSystemClass: /DataItem/WsManData/*[local-name(.)='SCX_FileSystemStatisticalInformation']/*[local-name(.)='PercentUsedInodes']
Unix.Authoring.WSManEnumeration.LessThanThreshold.ThreeState.MonitorType
A monitor type that performs a WS-Management Enumeration of a specified class (filtered by a specified instance name), and evaluates a specified property value against numeric warning and error threshold values. For use in monitoring properties with numeric data types, where errors are indicated by values lower than a threshold. The value of the specified property is averaged before evaluation.
Microsoft.Unix.Library!Microsoft.Unix.WSMan.PerfCounterProvider.Filtered
ObjectName
The Object name used in performance data mapping.
CounterName
The Counter name used in performance data mapping.
Value
An XPath query, in the form of a $Data$ variable, that identifies the value of the returned DataItem to evaluate for monitoring. For example, the following Value specification h evaluates the PercentUsedInodes property of the SCX_FileSystemStatisticalInformation Class: $Data/WsManData/*[local-name(.)='SCX_FileSystemStatisticalInformation']/*[local-name(.)='PercentUsedInodes']$
The threshold for the Warning state. If the value specified by Value is lower than this threshold, but greater than the Error Threshold, the monitor will be set to a Warning state. If the value is greater than the Warning Threshold, the monitor will be set to a Healthy state.
The threshold for the Error state. If the value specified by Value is lower than this threshold, the monitor will be set to an Error state.
NumSamples
The number of samples to average before threshold evaluation.
Unix.Authoring.WSManEnumeration.GreaterThanThreshold.ThreeState.MonitorType
A monitor type that performs a WS-Management Enumeration of a specified class (filtered by a specified instance name), and evaluates a specified property value against numeric warning and error threshold values. For use in monitoring properties with numeric data types, where errors are indicated by values higher than a threshold.
The threshold for the Warning state. If the value specified by Value is higher than this threshold, but less than the Error Threshold, the monitor will be set to a Warning state. If the value is less than the Warning Threshold, the monitor will be set to a Healthy state.
The threshold for the Error state. If the value specified by Value is higher than this threshold, the monitor will be set to an Error state.
<UnitMonitor ID="MyMP.WSManEnumGreaterThan.Monitor" Accessibility="Internal" Enabled="true" Target="MyMP.MyRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UnixAuth!Unix.Authoring.WSManEnumeration.GreaterThanThreshold.ThreeState.MonitorType" ConfirmDelivery="false">
<AlertSettings AlertMessage="MyMP.WSManEnumGreaterThan.Monitor.AlertMessage">
<AlertParameter2>$Data/Context/Value$</AlertParameter2>
<Uri>
http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_UnixProcessStatisticalInformation?__cimnamespace=root/scx
</Uri>
<WSManFilter>Select Name,PercentUsedMemory,PercentUserTime from SCX_UnixProcessStatisticalInformation</WSManFilter>
<ObjectName>Process</ObjectName>
<CounterName>Percent User Time</CounterName>
<InstanceXPath>
/DataItem/WsManData/*[local-name(.)='SCX_UnixProcessStatisticalInformation']/*[local-name(.)='Name']
</InstanceXPath>
<InstanceName>scxcimserver</InstanceName>
<Not>
<Expression>
<Exists>
<XPathQuery Type="String">WsManData/ErrorCode</XPathQuery>
</Exists>
</Expression>
</Not>
<Value>
$Data/WsManData/*[local-name(.)='SCX_UnixProcessStatisticalInformation']/*[local-name(.)='PercentUserTime']$
</Value>
<WarningThreshold>10</WarningThreshold>
<ErrorThreshold>20</ErrorThreshold>
<NumSamples>2</NumSamples>