none
How to Create an overridable parameter

    Question

  • HI,

    I am monitoring if how many process are running on a node. But in some instances the process number would be different. How can I create an overridable parameter for MinInstance Count, MaxInstanceCount?

    Please see my XML code bellow:

          <UnitMonitor ID="CN.My.App.MyProcess.ProcessInstanceCountMonitor" Accessibility="Public" Enabled="true" Target="CN.My.App.CrewTalkImpresarioServer.Class" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="false" Priority="Normal" TypeID="MicrosoftSystemCenterProcessMonitoringLibrary!Microsoft.SystemCenter.Process.ProcessInstanceCountMonitorType" ConfirmDelivery="false">
            <Category>AvailabilityHealth</Category>
            <AlertSettings AlertMessage="CN.My.App.MyProcess.ProcessInstanceCountMonitor.AlertMessage">
              <AlertOnState>Error</AlertOnState>
              <AutoResolve>true</AutoResolve>
              <AlertPriority>Normal</AlertPriority>
              <AlertSeverity>Error</AlertSeverity>
            </AlertSettings>
            <OperationalStates>
              <OperationalState ID="OK" MonitorTypeStateID="InsideRangeState" HealthState="Success" />
              <OperationalState ID="Error" MonitorTypeStateID="OutsideRangeState" HealthState="Error" />
            </OperationalStates>
            <Configuration>
              <ProcessName>MyProcess.exe</ProcessName>
              <Frequency>60</Frequency>
              <MinInstanceCount>1</MinInstanceCount>
              <MaxInstanceCount>1</MaxInstanceCount>
              <InstanceCountOutOfRangeTimeThresholdInSeconds>60</InstanceCountOutOfRangeTimeThresholdInSeconds>
            </Configuration>
          </UnitMonitor>

    Wednesday, August 27, 2014 12:22 PM

Answers

  • You will need to specify the parameters in the configuration of the monitor type and the data source, and then also specify the override parameters on the monitor type.

    Example on unit monitor type:

    <Configuration>
      <xsd:element name="MinInstanceCount" type="xsd:int" minOccurs="1" />
      <xsd:element name="MaxInstanceCount" type="xsd:int" minOccurs="1" />
    </Configuration>
    <OverrideableParameters>
      <OverrideableParameter ID="MinInstanceCount" ParameterType="int" Selector="$Config/MinInstanceCount$" />
      <OverrideableParameter ID="MaxInstanceCount" ParameterType="int" Selector="$Config/MaxInstanceCount$" />
    </OverrideableParameters>

    And then use these parameter in your expression filters to evaluate state, by using variable notation $Config/MinInstanceCount$ and $Config/MaxInstanceCount$.

    It's not possible to specify override parameter configuration directly on a unit monitor - you will need a unit monitor type at a minimum.


    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

    Thursday, August 28, 2014 2:24 AM
    Moderator

All replies