Ad Widget

Collapse

Data collected through ODBC is not stored

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Deox
    Junior Member
    • Dec 2023
    • 8

    #1

    Data collected through ODBC is not stored

    Hi All,

    I'm trying to collect some data through ODBC driver from MS SQL Server.
    Tests collect the data, however it is not visible through Latest Data and Database item history table is empty for that item

    Infrastructure:
    Zabbix server 6.2.3, Debian 11, ​driver '[ODBC Driver 18 for SQL Server]' installed through package msodbcsql18.


    Problem behavior:
    No issues with connecting through odbc

    1. Item: db.odbc.get[get_version,,DRIVER=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.3.so.2.1;SERVER=xx.xx.xx.xx;PORT=1433;UID=xxxxx xxx;PWD=xxxxxxxxxx;TrustServerCertificate=YES]
    Click image for larger version

Name:	image.png
Views:	527
Size:	12.9 KB
ID:	476208



    'Test - Get value and test' buttons provide correct JSON response, Update interval is 5 minutes and 'Execute now' button sends request with no issues
    Click image for larger version

Name:	image.png
Views:	253
Size:	35.6 KB
ID:	476209​​




    However, latest data is empty, as well as history SQL table for that item. Other items collected with no issues. No changes in a day
    Click image for larger version

Name:	image.png
Views:	252
Size:	26.3 KB
ID:	476211




    ​2. The same behavior with another key (select instead of get) Item: db.odbc.select[get_version,,DRIVER=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.3.so.2.1;SERVER=xx.xx.xx.xx;PORT=1433;UID=xxxxx xxxx;PWD=xxxxxxxxxxx;TrustServerCertificate=YES]

    Test provides correct data using String instead of JSON, however it is not saved as well
    Click image for larger version

Name:	image.png
Views:	249
Size:	28.4 KB
ID:	476212



    3. First attempts were using MSSQL by ODBC zabbix template with the same issue. DSN, User and Password were provided through macros, Items were tested with JSON provided, however data is not stored and Dependent/Calculated items were empty.


    Any ideas to troubleshoot?



    Attached Files
  • Answer selected by Deox at 27-04-2024, 09:48.
    Hamardaban
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2019
    • 2713

    First of all, upgrade to the current version (6.2.9 or 6.4.13) - this error may have already been fixed?
    Then look at whether there are records related to these hosts or items in the Zabbix server (or proxy) log?
    And check the startup settings "StartODBCPollers" in the server (or proxy) config.
    Last edited by Hamardaban; 25-03-2024, 15:22.

    Comment

    • Deox
      Junior Member
      • Dec 2023
      • 8

      #2
      Hi Team,

      Any new ideas?

      Thanks

      Comment

      • Hamardaban
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • May 2019
        • 2713

        #3
        First of all, upgrade to the current version (6.2.9 or 6.4.13) - this error may have already been fixed?
        Then look at whether there are records related to these hosts or items in the Zabbix server (or proxy) log?
        And check the startup settings "StartODBCPollers" in the server (or proxy) config.
        Last edited by Hamardaban; 25-03-2024, 15:22.

        Comment

        • Deox
          Junior Member
          • Dec 2023
          • 8

          #4
          Originally posted by Hamardaban
          First of all, upgrade to the current version (6.2.9 or 6.4.13) - this error may have already been fixed?
          Then look at whether there are records related to these hosts or items in the Zabbix server (or proxy) log?
          And check the startup settings "StartODBCPollers" in the server (or proxy) config.
          Hi Hamardaban, yes, the StartODBCPollers was set to 0 in the config file, which is not the default value. Thank you!

          Comment

          Working...