Поделиться через


Targeting workflows to Resource pools

<!--[if lt IE 9]>

<![endif]-->

Comments

  • Anonymous
    January 01, 2003
    Back in November I blogged a variant of this that will make a SCOM-2007-safe MP. http://blogs.technet.com/b/omx/archive/2013/11/15/use-the-all-management-servers-resource-pool-to-run-scheduled-tasks.aspx Although I'm curious if/how you could target a different resource pool. For example, I have a group of gateways in a remote data center that are in a resource pool. How could I target their resource pool? I never figured that one out.
  • Anonymous
    January 27, 2014
    Very usefull, thanks for sharing!
  • Anonymous
    February 01, 2014
    Had not thought about targeting resource pools in monitoring workflows before now. This can be useful in certain types of operational tasks that you might want to run in the management group. Previously, I would have targeted the RMSE, but will now target a resource pool. Thanks for the idea :)
  • Anonymous
    July 08, 2014
    I created a couple of two-state script monitors targeting the AMSRP which works great, however, if I place one monitor into MMode, the entire pool goes into MMode. What targeting consideration am I missing?
  • Anonymous
    August 06, 2015
    I am seeing resource pool workflow distribution issue on my setup.
    I have custom resource pool created. There were 2 management servers added to it. After a day or 2, I removed one of the servers from the resource pool.
    And SCOM is still distributing workflows to that management server. These workflows are targeted on the entities managed by resource pool.
    Can you provide any suggestions?
  • Anonymous
    June 28, 2016
    Hi,I have written a PS script discovery wich i planned to run against the AMSRP but the discovery doesent seem to run. If i change target to "management server" it Works just fine. Is ther any thing i am missing?
    • Anonymous
      June 28, 2016
      if you change target to MS it runs on all MS in the pool. If you change it to target a pool, it will run only on the MS that hosts the instance of the pool class, which will be one of the MS in the pool.
      • Anonymous
        July 01, 2016
        Hi KevinDo you know if it's possible to run a on-demand discovery task for a discovery that targets the AMSRP? And if so which target class instance should we provide? If I try using the target instance returned from say Get-SCOMClass -Name Microsoft.SystemCenter.AllManagementServersPool|Get-SCOMClassInstance the discovery task returns 'DISCOVERY_NOT_FOUND'ThanksMichael
        • Anonymous
          July 01, 2016
          I don't. What's the scenario?
          • Anonymous
            July 06, 2016
            Thanks for asking :-) Well, here's the scenario:Just as you’ve demonstrated monitors having the resource pool “All Management Servers Resource Pool” (AMSRP) as target, discoveries can also have AMSRP as target. An example of this, is the standard discovery “Discover Operational Database Watchers” of the management pack “System Center Internal Library”. During my development of management packs I usually run the on-demand discovery tasks (to speed up the discovery). However I’ve not been able to run the on-demand discovery task successfully for discoveries that targets the AMSRP. Every time the task result is ‘DISCOVERY_NOT_FOUND’. Here an example:$task= get-scomtask -name Microsoft.SystemCenter.TriggerOnDemandDiscovery$discovery = Get-SCOMDiscovery -DisplayName 'Discover Operational Database Watchers'$target = Get-SCOMResourcePool -DisplayName 'All Management Servers Resource Pool'$overrides=@{DiscoveryId=$discovery.Id.ToString();TargetInstanceId=$target.Id.ToString()}$managementServer = (Get-SCOMManagementServer)[0]$instance=get-scomclass -name Microsoft.SystemCenter.HealthService| get-scomclassinstance | ?{$_.displayname -eq ($managementServer.DisplayName)}start-scomtask -task $task -instance $instance -override $overrides
  • Anonymous
    July 11, 2017
    If I target a powershell script workflow at the AMSRP that uses the operationsmanager module to get information about the management group (such as get-scommanagementserver, get-scomresourcepool, etc.), it succeeds just fine running every 15 minutes until after roughly 24 hours, it begins to fail. If I restart the healthservice on the management server hosting the AMSRP, it will succeed once again for roughly 24 hours and then begin failing once more.Any idea what the cause and solution to that might be?
    • Anonymous
      July 12, 2017
      Yes David I have seen this very issue with my customers. It seems to happen when the SDK is very busy on a management server. Scripts running on the management server stop being able to reliably connect to the SDK, or load the SCOM module. What I have found is that Import-Module OperationsManager becomes unreliable. What I have done is change my custom SDK connecting scripts to use this, which seems to resolve the issue:#Connect to SCOM Management Group Section#=================================================================================$MServer = "localhost"# Clear any previous errorsif($Error){ $Error.Clear()}# Import the OperationsManager module and connect to the management groupTry { $SCOMPowerShellKey = "HKLM:\SOFTWARE\Microsoft\System Center Operations Manager\12\Setup\Powershell\V2" $SCOMModulePath = Join-Path (Get-ItemProperty $SCOMPowerShellKey).InstallDirectory "OperationsManager" Import-module $SCOMModulePath}Catch { $momapi.LogScriptEvent($ScriptName,9876,2, "Unable to load the OperationsManager module, Error is: $error") }Try { New-DefaultManagementGroupConnection $MServer}Catch { $momapi.LogScriptEvent($ScriptName,9876,2, "Unable to connect to the management server: $MServer. Error when calling New-DefaultManagementGroupConnection. Error is: $error")} #=================================================================================
  • Anonymous
    December 12, 2017
    Hi Kevin,If I make a custom ressource pool with gateways, and I target workflows on it, will they really be executed on the gateways ?Since all the classes used for the ressource pools aren't hosted, i doubt that my workflows will run on any management servers instead of the selected gateways.Thank you,Marc