MonitoringHost.exe is consuming 100% CPU and blocking the SQL server in some cases.
We’ve seen this high load on machines with a SQL installation in combination with the OpsMgr SQL management pack.
This issue is already addressed to the product group and they are going to fix this issue in the future.
Until the fix has released there exist a workaround, which can be applied to all SCOM managed SQL Machines independently of the OS.
You can find more details under:
Hosting-related Registration Keys:
Some default aspects of script execution and behavior in Operations Manager-hosted Windows PowerShell scripts can be customized by setting registry keys. These values can be found in the following node in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules\Global\PowerShell
The following table shows the registry keys used to control script execution behavior for Windows PowerShell scripts run from an Operations Manager module:
Key Description Default Value
Controls how many hosted Windows PowerShell scripts are allowed to run globally. 0x00000014
Specifies whether a separate AppDomain will be used for each script. A value of 1 indicates that a separate AppDomain is used for each script.
You have many ways to accomplish this. Maybe as a .reg file like this:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules\Global]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules\Global\Powershell]
Or maybe with .ps1 file like this:
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules\Global" -Name Powershell –Force
new-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules\Global\Powershell" -name IsolationLevel` -value 0 -force -PropertyType DWORD
new-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules\Global\Powershell" -name ScriptLimit` -value 14 -force -PropertyType DWORD
Big thanks to Stefan Wuchenauer for sharing this information!