Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-25071

MSSQL for Zabbix Agent 2 perfcounter query issue

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • None
    • Agent2 plugin (N)
    • None

      Steps to reproduce:

      1. If you run the MSSQL plugin on system with a non-named instance, it will fail to pull values due to a naming mistake from the sys.dm_os_performance_counters table. This is due to an issue in the perfcounter.get.sql file that doesn't take the default SQL name into account when it is not a named instance.

      This can be fixed with the following addition:

      DECLARE @SQLNAME NVARCHAR(50)
      SET @SQLNAME = CASE WHEN @@SERVICENAME = 'MSSQLSERVER' THEN 'SQLServer' ELSE 'MSSQL$' + @@SERVICENAME END

      I have attached a corrected perfcounter.get.sql file with this addition, including the variable replacements.

            akotsegubov Aleksandr Kotsegubov
            Brain2000 Brian Coverstone
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: