Use discovered objects in custom script monitor ( VSAE, custom MP, composition )

Hi,

I'm authoring a custom MP with VSAE for an internal application.

My scenario:
- A server has connection to various devices
- Devices are discovered by script
- Devices shall be tested via small synthetic transaciton
- Devices can only be contacted through the specific server where the devices are connected
- As there are many devices 'cookdown' in the monitoring-script is my target

Code:
- Specific Computer Class, Base="Windows!Microsoft.Windows.ComputerRole
- Seed class, Base="Windows!Microsoft.Windows.ApplicationComponent" used in discovery to fill the custom computer class
- Hosting relationship between both classes
- Specific Device Classe, Base="Windows!Microsoft.Windows.ApplicationComponent"
- Hosting relationship between Device Class and Specific Computer class

How I could solve my request:
A) Use the method from the discovery script to find the attched devices in the monitoring script
--> Would result in redundant code, which I'd like to avoid
--> Is costive on the agent-server as the script for checking runs every 300 seconds
B) Query the previously discovered devices from the SCOM DB on each agent
--> Would result on additional load on the management server
--> Is creating more network traffic and takes more time
C) A way to use variables in order to get all attached, previously discovered devices



Is there a way to use previously discovered objects in a custom monitor ?

Thanks in advance

Ruben




  • Edited by Ruben_I-O Sunday, September 06, 2015 10:14 PM changed format
September 6th, 2015 12:58pm

I found the solution for the problem.

      <UnitMonitor ID="Custom.Example.AgentlessDeviceMonitoring.Monitor.PingCheck" Accessibility="Public" Enabled="true" Target="Custom.Example.AgentlessDeviceMonitoring.Class.Store.AgentlessRegister" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" RunAs="Custom.Example.AgentlessDeviceMonitoring.RunAS.Profile" TypeID="Windows!Microsoft.Windows.WmiBased.Performance.ConsecutiveSamplesThreshold" ConfirmDelivery="false">
        <Category>AvailabilityHealth</Category>
        <OperationalStates>
          <OperationalState ID="ConditionFalse" MonitorTypeStateID="ConditionFalse" HealthState="Success" />
          <OperationalState ID="ConditionTrue" MonitorTypeStateID="ConditionTrue" HealthState="Error" />
        </OperationalStates>
        <Configuration>
          <NameSpace>root\cimv2</NameSpace>
          <Query>Select StatusCode from Win32_PingStatus Where Address ='$Target/Property[Type="System!System.Entity"]/DisplayName$'</Query>
          <Frequency>800</Frequency>
          <ObjectName>Register Ping Status</ObjectName>
          <CounterName>PingResponse</CounterName>
          <InstanceName />
          <Value>$Data/Property[@Name='StatusCode']$</Value>
          <Threshold>0</Threshold>
          <Direction>greater</Direction>
          <NumSamples>4</NumSamples>
        </Configuration>
      </UnitMonitor>

Found on:

Monitoring Point-of-Sale Devices Remotely Using System Center Operations Manager

  • Marked as answer by Ruben_I-O 58 minutes ago
Free Windows Admin Tool Kit Click here and download it now
September 14th, 2015 2:11am

I found the solution for the problem.

      <UnitMonitor ID="Custom.Example.AgentlessDeviceMonitoring.Monitor.PingCheck" Accessibility="Public" Enabled="true" Target="Custom.Example.AgentlessDeviceMonitoring.Class.Store.AgentlessRegister" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" RunAs="Custom.Example.AgentlessDeviceMonitoring.RunAS.Profile" TypeID="Windows!Microsoft.Windows.WmiBased.Performance.ConsecutiveSamplesThreshold" ConfirmDelivery="false">
        <Category>AvailabilityHealth</Category>
        <OperationalStates>
          <OperationalState ID="ConditionFalse" MonitorTypeStateID="ConditionFalse" HealthState="Success" />
          <OperationalState ID="ConditionTrue" MonitorTypeStateID="ConditionTrue" HealthState="Error" />
        </OperationalStates>
        <Configuration>
          <NameSpace>root\cimv2</NameSpace>
          <Query>Select StatusCode from Win32_PingStatus Where Address ='$Target/Property[Type="System!System.Entity"]/DisplayName$'</Query>
          <Frequency>800</Frequency>
          <ObjectName>Register Ping Status</ObjectName>
          <CounterName>PingResponse</CounterName>
          <InstanceName />
          <Value>$Data/Property[@Name='StatusCode']$</Value>
          <Threshold>0</Threshold>
          <Direction>greater</Direction>
          <NumSamples>4</NumSamples>
        </Configuration>
      </UnitMonitor>

Found on:

Monitoring Point-of-Sale Devices Remotely Using System Center Operations Manager

  • Marked as answer by Ruben_I-O Monday, September 14, 2015 6:10 AM
September 14th, 2015 6:09am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics