Menu Close

How to exclude SQL Express Edition from SCOM Monitoring

You might remember I wrote about this many years ago, on how to exclude discovery and monitoring of Express editions of SQL using the “ExcludeList” property of the SQL discovery:

https://kevinholman.com/2010/02/13/stop-monitoring-sql-express-and-windows-internal-database/

 

That was cool…. but really did not go as far as we needed it to.  Excluding SQL Engine discoveries by Instance Name was great, but didn’t work if we had SQL Express editions out there using MSSQLSERVER as their instance name.  We could not include that, as that would cause all our “real” production default instances to disappear.

It is very common that we will discover SQL Express editions by default, however, these are often unwanted to be monitored in production environments:

image

 

Well, finally, this is solved in the SQL MP 7.0.20.0 (Version Agnostic).  This MP adds a new override-able property to the DB Engine discovery, for excluding by EDITION name!

image

 

Supported values (comma separated) are:  Enterprise, Standard, Web, Developer, Express

It does not appear to be case sensitive.

 

Another new update, on the ability to Exclude discovery by INSTANCE NAME – we now have Wildcard capability.  Previously we could filter our discovery by explicit name, but now we support wildcards!

image

 

So now we can exclude monitoring of SQL instances by VERSION, EDITION, and INSTANCE NAME

 

image

5 Comments

  1. Frederik

    When adding the exclusion for SQL Express, we get the following error on 1 of our scom management servers:

    Management Group: “uzscom16”
    Module: Microsoft.SQLServer.Core.Module.Helper.Tasks.WriteOverride
    Version: 7.0.20.0

    Error(s) was(were) occurred:
    Message:
    ———- Exception: ———-
    Exception Type: Microsoft.EnterpriseManagement.ContainerException
    Message: The container could not find a component with name ‘ExtensionManagement’ compatible with type ‘Microsoft.EnterpriseManagement.Configuration.IExtensionManagement, Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’.
    Source: Microsoft.EnterpriseManagement.Core
    Stack Trace:
    at Microsoft.EnterpriseManagement.Container.GetService[T](String name)
    at Microsoft.EnterpriseManagement.Configuration.Verification.VerifyManagementPackElementName.GetExtensions()
    at Microsoft.EnterpriseManagement.Configuration.Verification.VerifyManagementPackElementName.Verify(ManagementPack mp)
    at Microsoft.EnterpriseManagement.Configuration.Verification.VerificationEngine.CheckPrerequisite(Boolean verifyFragment)
    at Microsoft.EnterpriseManagement.Configuration.Verification.VerificationEngine.Verify(Boolean isUpdate, Boolean throwError)
    at Microsoft.EnterpriseManagement.Configuration.Verification.VerificationEngine.VerifyMP(ManagementPack mp, Boolean isUpdate, Boolean throwError)
    at Microsoft.SQLServer.Core.Module.Helper.Tasks.WriteOverride.ModifyOrCreateOverride(OverrideSettings settings)
    at Microsoft.SQLServer.Core.Module.Helper.Tasks.WriteOverride.d__15.MoveNext()
    — End of stack trace from previous location where exception was thrown —
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.SQLServer.Module.Helper.Base.ModuleBasePropertyHelper`1.d__13.MoveNext()

    State:
    The configuration properties are:
    ManagementGroupName = uzscom16
    Publisher = SQLDiscoveryWindows
    Enforced = null
    ManagementServerName = null
    OverrideCategory = Property
    OverrideDisplayName = Disable filter autosetup rule
    OverrideManagementPackDisplayName = null
    OverrideManagementPackName = null
    OverrideName = Microsoft.SQLServer.Windows.RuleOverride.LocalDBEngineDiscoveryFilterSetup
    OverrideValue = false
    TargetElementId = {476C2368-BA4E-061D-CE6E-0950DC93C1D9}
    TargetModuleName = null
    TargetParameterName = Enabled
    TimeoutSeconds = 300

    Error(s):

    ———- Exception: ———-
    Exception Type: Microsoft.EnterpriseManagement.ContainerException
    Message: The container could not find a component with name ‘ExtensionManagement’ compatible with type ‘Microsoft.EnterpriseManagement.Configuration.IExtensionManagement, Microsoft.EnterpriseManagement.Core, Version=7.0.5000.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’.
    Source: Microsoft.EnterpriseManagement.Core
    Stack Trace:
    at Microsoft.EnterpriseManagement.Container.GetService[T](String name)
    at Microsoft.EnterpriseManagement.Configuration.Verification.VerifyManagementPackElementName.GetExtensions()
    at Microsoft.EnterpriseManagement.Configuration.Verification.VerifyManagementPackElementName.Verify(ManagementPack mp)
    at Microsoft.EnterpriseManagement.Configuration.Verification.VerificationEngine.CheckPrerequisite(Boolean verifyFragment)
    at Microsoft.EnterpriseManagement.Configuration.Verification.VerificationEngine.Verify(Boolean isUpdate, Boolean throwError)
    at Microsoft.EnterpriseManagement.Configuration.Verification.VerificationEngine.VerifyMP(ManagementPack mp, Boolean isUpdate, Boolean throwError)
    at Microsoft.SQLServer.Core.Module.Helper.Tasks.WriteOverride.ModifyOrCreateOverride(OverrideSettings settings)
    at Microsoft.SQLServer.Core.Module.Helper.Tasks.WriteOverride.d__15.MoveNext()
    — End of stack trace from previous location where exception was thrown —
    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
    at Microsoft.SQLServer.Module.Helper.Base.ModuleBasePropertyHelper`1.d__13.MoveNext()

    Do you have any idea why we are seeing this error on only one management server?
    We currently have 2 management servers in our environment, all patched up to scom2019 UR1
    This issue only occurs when we add the exclusion “Express” in the sql discovery.

  2. Kevin Holman

    This generally happens when you place the override in the wrong place. Did you put something else in the “versions to be excluded” ?

  3. Santi

    Even though i have EXPRESS in exclude sql versions override i can see many sql servers with express edition in sql server roles view..
    Any idea whys its happening?

    • Kevin Holman

      Thats because that’s NOT where the override goes, and will break discovery. Look at the article in detail for the correct override location.

  4. Pingback:System Center Şubat 2020 Bülten – Sertaç Topal

Leave a Reply

Your email address will not be published. Required fields are marked *