locked
SQL Custom Discovery RRS feed

  • Question

  • Hello @all,

    Currently we have   a task to provide a customized SQL monitoring to our customers.
     
      We need to differentiate in three categories:

     1 - NO SQL Monitoring (Monitoring and Discovery disabled)

     2 - Basic - only SQL – services

     3 - Full SQL Monitoring (all enabled)

    Discovery of Original SQL Packs would be disabled.

    The Cases 1 + 3 are easy to catch. We have created two Reg Keys, identity’s the Server as an SQL Server, the second Key specifies the level of Monitoring 1, 2 or 3.

    We`ve created an Attribute and Dynamic Groups for the cases 1+3.

    But in Case 2 we have some Problems. The Machines have two or more SQL Instances.

    In Reason, that’s the discovery are disabled, we can`t catch automatically all SQL Services on the Machines.

    Each Service should be shown in a separate Monitor.

    I`m gratefulfor any tips

    kind regards

    Michael

    Monday, November 17, 2014 9:26 AM

Answers

  • Hi,

    With below command we can get all instance running on the SQL server:

    (get-itemproperty 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server').InstalledInstances

    And the below command will list all SQL related services' name and status:

    Get-Service |?{$_.name -like "*sql*"}|select name, status

    Regards,

    Yan Li


    Regards, Yan Li

    • Proposed as answer by Yan Li_ Friday, November 21, 2014 2:46 AM
    • Marked as answer by Yan Li_ Tuesday, November 25, 2014 6:17 AM
    Wednesday, November 19, 2014 5:34 AM

All replies

  • Hi Michael,

    Based on my understanding, your issue is that with discovery disabled, you are not able to monitor some services related with SQL. Have you tried creating a basic service monitor?

    In addition, we could create a scripting monitor to check service status.

    Regards,

    Yan Li


    Regards, Yan Li

    Tuesday, November 18, 2014 5:05 AM
  • Hi Yan Li,

    We know that, but it is unfortunately a request of one of our customer.

    Yes, we have created an Basic Service Monitor, this works fine on Machines with only one Instance.

    On Machines with two or more Instances we need a script or something else to "discover" all SQL Services.

    To create this script, we need some assistance, could you help us?

    Regards

    Michael

    Tuesday, November 18, 2014 1:08 PM
  • Hi,

    With below command we can get all instance running on the SQL server:

    (get-itemproperty 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server').InstalledInstances

    And the below command will list all SQL related services' name and status:

    Get-Service |?{$_.name -like "*sql*"}|select name, status

    Regards,

    Yan Li


    Regards, Yan Li

    • Proposed as answer by Yan Li_ Friday, November 21, 2014 2:46 AM
    • Marked as answer by Yan Li_ Tuesday, November 25, 2014 6:17 AM
    Wednesday, November 19, 2014 5:34 AM
  • Hi Yan,

    thanks a lot.

    It works fine.

    Regards

    Michael

    Wednesday, November 19, 2014 12:08 PM