Jimmy Harper's Operations Manager Blog

Posts in this blog are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of Use

No Alert from SQL MP when clustered services go down

No Alert from SQL MP when clustered services go down

  • Comments 15
  • Likes

I recently ran into the following issue:

The SQL Server Management Pack has several monitors to monitor various SQL Services:


However, on a SQL Cluster, if one of these services is taken offline:


We don't get an alert from SQL (we do get a cluster alert saying that a cluster is offline), and the monitor stays healthy:


This happens because:

  1. By default, a Basic Service Monitor will only monitor services whose startup type is Automatic
  2. On a Clustered SQL instance, the service startup type will be set to Manual

To fix this, you simply need to set the "Alert only if startup type is automatic" override to "False" for the Clustered SQL Instances





Now, the health state is changed when the service is down and we are properly alerted:




  • The SQL Monitors affected by this are:
    • Microsoft.SQLServer.2008.DBEngine.ServiceMonitor
    • Microsoft.SQLServer.2008.ReportingServices.ServiceMonitor
    • Microsoft.SQLServer.2008.AnalysisServices.ServiceMonitor
    • Microsoft.SQLServer.2008.IntegrationServices.ServiceMonitor
    • Microsoft.SQLServer.2008.DBEngine.FullTextSearchServiceMonitor
    • Microsoft.SQLServer.2008.Agent.ServiceMonitor
    • Microsoft.SQLServer.2005.DBEngine.ServiceMonitor
    • Microsoft.SQLServer.2005.ReportingServices.ServiceMonitor
    • Microsoft.SQLServer.2005.AnalysisServices.ServiceMonitor
    • Microsoft.SQLServer.2005.IntegrationServices.ServiceMonitor
    • Microsoft.SQLServer.2005.DBEngine.FullTextSearchServiceMonitor
    • Microsoft.SQLServer.2005.Agent.ServiceMonitor

  • You must have at least version 6.0.6441.0 of the SQL Server Management Pack for this to work.  The latest version is 6.0.6460.0 and can be downloaded here.
  • If you manually create a Basic Service Monitor in the OpsMgr console, the "Alert only if startup type is automatic" override will not work.  You'll need to export the MP and edit the XML to add <CheckStartupType>true</CheckStartupType> to the monitor configuration (this is already done in the latest SQL MP):

Before change (not working):


After change (working):


  • Jimmy,

    I tried this, as mentioned in the MP guide. It resulted in alerts from all systems where the SQL instance wasn't active.

    How did you mention to work around this?

  • Can you verify how the override is set?  Are you targeting the override at "SQL 2005 DB Engine" and selecting ONLY the SQL Clusters, and not the physical cluster nodes?

  • I also set this per the MP guide in our Dev environment, and got a lot of alerts where the service(s) are set to manual.  On page 15 of the MP Guide it says "If you are monitoring a SQL Server cluster, change the parameter, “Alert only if service startup type is automatic”, to false for the following monitors" (and it lists the same monitors Jimmy does).  It's not clear if you are supposed to override these ONLY for  SQL Clusters, physical cluster nodes, or all SQL servers.  

  • You'll only want to target the SQL Cluster with this override....so it will only apply to the current active node of the cluster.  When setting the override, select "for a specific object of type: SQL 2005 DB Engine" and select your SQL cluster...or, create a group of the clustered DB Engines and target that group.  Again, the key is to target only the clustered DB Engines.

  • Hi,

    I tried your workaround and it worked fine. But i tried this on my own Custom Monitors it didn't worked. So i did some research and found the below soultion to raise an alert for a Manual service with custom monitrs:

    1. Create your own service monitor.

    2. Export the MP in XML from.

    3. Open the MP in authoring Console.

    4. Go to the properties of that monitor.

    5. Go to the Configuration Tab.

    6. Click Edit (if asked for editor select the c:\Windows\System32\Notepad.exe)

    7. Add the line in Notepad before the last line (</Configuration>) as below:


    8. Save the settings and re-import the MP on RMS

    9. Create an override for Manual Service Monitoring.

    10. It starts working now :)

  • I have the same problem with SQL 2000 cluster.

    I override the value from blank to "false", but the monitor still not work as excepted. Any suggestion?

  • I have checked SQL 2000 MP and found: there is no such state "<CheckStartupType>true</CheckStartupType>"

    then how to fix this problem on SQL 2000 cluster?

  • Interesting....just checked the SQL 2000 MP myself and CheckStartupType is not there.  So, for SQL 2000, you would need to do the following:

    1. Disable the current service monitor in the SQL 2000 MP

    2. Create a new service monitor in your custom MP.

    3. Modify the XML to include "<CheckStartupType>true</CheckStartupType>"

    I haven't verified this yet, but I believe that if you are using R2, the "<CheckStartupType>true</CheckStartupType>" will already be in the XML when you create a service monitor (of course, that doesn't fix the current SQL 2000 MP).

  • I will try it and let you know the result. Thanks!

  • Jimmy, I am facing a new problem.

    I have created service monitor in my custom MP, but I am not sure which service name to input in the monitor. Since we have many SQL named instances on our server.

    I tried input "MSSQL$SQL2" into the service name field. On other SQL clusters, the service name is not "MSSQL$SQL2", this will make the monitor turn to critical state. Since no "MSSQL$SQL2" service is found on the server. The State value is "8" which means "MOM_SERVICE_NOT_FOUND".

    This is not acceptable to me. Any suggestion to resolve this problem?

  • I have tried input "$Target/Property[Type="SQL!Microsoft.SQLServer.DBEngine"]/ServiceName$" into the service name field as the SQL MP does. But got an error said "Unknown alias [SQL]"

    How to define such alias in my custom MP?


  • seems I need to define those alias in my custom MP.

    How to do it?

  • Here's a quick way to do this:

    1.  When creating the service monitor, enter a bogus name for the service name and skip ahead to the "Configure Alerts" page.  

    2.  Select the "Generate alerts" check box.

    3.  Click on the "..." button next to "Alert description".

    4.  Select "Target - SQL Server Windows Service Name".

    5.  This should enter the XPath for the Service name into the Alert Description field.  Copy this value and paste it into the Service Name field on the Service Details page.

  • oh! really a good way!!

    Another small question:

    what is the difference between "SQL Server Windows Service Name" and "SQL Server Windows Service Name If Clustered Resource"?

    Thanks Again!!

  • Hi Jimmy, I am using the latest SQL MP for SQL 2008. After applying the service override for sql cluster, monitor is still not working. Any ideas ?

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment