Ad Widget

Collapse

Mssql monitoring with lld

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nikolaicheg
    Senior Member
    • Feb 2009
    • 111

    #1

    Mssql monitoring with lld

    Hello!
    I have some DB servers with MS SQL 2014.
    I'm using lld by the https://www.zabbix.org/wiki/Docs/how...ixODBC_and_LLD
    But htere is a problem, that answer from query is truncated to 2048 butes, so zabbix server got errors about "Value should be a JSON object."
    Manual says that only errors truncated to 2048 bytes. Any ideas what to do?
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Hi,

    I think, it seems mssql setting value is causing.
    MS SQL Server has limit size for SELECT statement.
    You can change that limit size by command.

    Can you try add strings before sql?
    That strings is 'set textsize=8192;'.
    The maximum setting for SET TEXTSIZE is 2 gigabytes.

    Then, sql statement becomes to below for Database monitor item.

    -----
    set textsize=8192; select '{"data":[', (SELECT STUFF...
    -----

    And, If you use freetds, please check text size parameter in freetds.conf.

    But i'm not tested.

    Additional Information:
    SET TEXTSIZE (Transact-SQL)
    Specifies the size, in bytes, of various data types returned to the client by a SELECT statement.

    The freetds.conf file

    Comment

    • Nikolaicheg
      Senior Member
      • Feb 2009
      • 111

      #3
      My freetds.conf has parameter set to 131072 bytes.
      freetds truncates output to 2032 bytes..
      I got 7170 bytes string.
      Tryed to debug odbc, it says, that string is too long. And truncates it and send couple of packets. So maybe zabbix_server can accept only one packet? Because in debug file i see all my data, but in couple packets.

      isql output is
      SQLRowCount returns 1
      4 rows fetched
      So Zabbix cant parse more than 1 row?
      Last edited by Nikolaicheg; 29-04-2015, 17:28.

      Comment

      • Nikolaicheg
        Senior Member
        • Feb 2009
        • 111

        #4
        Well...
        I made 4 clones of template, which have only discovery rule.
        In discovery rule i made a partiotion query by databases prefix, so i got ~1500 bytes of data.

        Comment

        • learner
          Junior Member
          • Nov 2015
          • 2

          #5
          MSSQL server monitoring : sql error cannot connect to ODBC DSN

          Hello,

          i have MSSQL server 2012, need to monitor the server.
          i am using LLD for monitoring, i am getting the error for ODBC DSN, please find the attached screenshot.

          Anyone please provide the complete configuration details.

          i am following the below links:

          Join the friendly and open Zabbix community on our forums and social media platforms.




          Thank you for your help.
          Attached Files
          Last edited by learner; 16-05-2016, 10:52.

          Comment

          Working...