Ad Widget

Collapse

How to detect and monitor service Microsoft SQL Server?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • squidw
    Junior Member
    • Oct 2017
    • 9

    #1

    How to detect and monitor service Microsoft SQL Server?

    Zabbix server got 3.0.
    The problem is that when we create instance in MSSQLServer this instance become a name of service. For example, standard name is "MSSQLSERVER" if default install, but if we create instance with name "SQLSRV" name of service will be "MSSQL$SQLSRV". So what need to detect MSSQLServer service to later monitor his state?
  • aigars.kadikis
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2018
    • 208

    #2
    Please try to run via command line
    Code:
    typeperf -qx | find ":Databases("
    Does the output will be quite long, but does it provide all the instance names?

    Comment


    • squidw
      squidw commented
      Editing a comment
      That interesting command, maybe use it later, but it show the databases and options of this databases that looks like perfomance counters. I need to check state of service first.
  • aigars.kadikis
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2018
    • 208

    #3
    Hi,

    Service monitoring you can cover by cloning "Template OS Windows". There is already a discovery for services. In your particular case, I believe you will be interested only in services starting with the name "MSSQL..":

    Please set in a filter section what is your scope of interest:
    Click image for larger version

Name:	mssql.png
Views:	5449
Size:	29.5 KB
ID:	374877
    Regards,

    Comment

    • elvar
      Senior Member
      • Feb 2008
      • 226

      #4
      Originally posted by aigars.kadikis
      Hi,

      Service monitoring you can cover by cloning "Template OS Windows". There is already a discovery for services. In your particular case, I believe you will be interested only in services starting with the name "MSSQL..":

      Please set in a filter section what is your scope of interest:
      Click image for larger version

Name:	mssql.png
Views:	5449
Size:	29.5 KB
ID:	374877
      Regards,
      Can you please show me the details of your discovery rule? If I create a separate template with a discovery rule using key 'service.discovery' it won't work because that key is already in use with the default windows services discovery rule. How were you able to have a separate discovery including '^(MSSQL.*) without the discovery rule key conflicting?

      Comment

      • aigars.kadikis
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Mar 2018
        • 208

        #5
        Hello Elvar,

        The way (more like a workaround) how to create another discovery key if already using "Template OS Windows" is to open zabbix_agentd.conf and set
        Code:
        Alias=another.key:service.discovery
        Now you can use "another.key" in a different template.

        Second approach:
        I would recommend better to remove "Windows service discovery" from "Template OS Windows" and create a separate template which covers the service monitoring.

        Regards,

        Comment

        • squidw
          Junior Member
          • Oct 2017
          • 9

          #6
          Originally posted by aigars.kadikis
          Hello Elvar,

          The way (more like a workaround) how to create another discovery key if already using "Template OS Windows" is to open zabbix_agentd.conf and set
          Code:
          Alias=another.key:service.discovery
          Now you can use "another.key" in a different template.

          Second approach:
          I would recommend better to remove "Windows service discovery" from "Template OS Windows" and create a separate template which covers the service monitoring.

          Regards,
          For now i got test in zabbix server 4.2. It has by default checking state of services. For now this topic is not relevant. If after testing zabbix server 4.2 i will have same problem than i come back to this topic.

          Comment

          Working...