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

Oracle - data.sql script broken - Templates import broken

XMLWordPrintable

    • Sprint 77 (Jun 2021), Sprint 78 (Jul 2021), Sprint 79 (Aug 2021)
    • 1

      Hello,

      the database scripts for creating the Zabbix database on Oracle is broken.

      The source of the problems is the table definition for the table items. Two columns are leading to the problem:

      params nvarchar2(2048) DEFAULT ''
      description nvarchar2(2048) DEFAULT ''

      Both columns are defined with a maximung length of 2048 chars. This is not enough to put in some items that are contained in the following three templates, that are included in the data.sql script:

      1. Template DB Oracle by ODBC (https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/oracle_odbc?at=refs%2Ftags%2F5.0.12)
      2. Template Server HP iLO SNMP (https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/server/hp_ilo_snmp?at=refs%2Ftags%2F5.0.12)
      3. Template Tel Asterisk by HTTP (https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/tel/asterisk_http?at=refs%2Ftags%2F5.0.12)

      With importing the according templates on a Zabbix 5.0.12 in the web frontend on a Oracle database you get the same errors. See the attached screenshots.
       
      The Template DB Oracle by ODBC and Template Server HP iLO SNMP only affects Zabbix Version 5.0.12.
      The Template  Tel Asterisk by HTTP affects also the Zabbix versions 5.2.6 and 5.4.1

      For the databases MySQL, PostgreSQL and SQlite the colums are defined as text. So there is no problem with the templates (compare the attached table create scripts for that databases and the oracle database).

      This is realy bad, because there would be an increasing number of Zabbix Templates that would not be usable on Zabbix installations with Oracle databases.

      For the first step, the according templates should be removed from the Oracle data.sql script, so that it is possible to create the database without errors.

      The second step must be to find all column defintions that are shorter, than in the other supported databases and fix them. All columns must have the same
      lenght (definition) to be sure that all templates are working on all supported datbases.
       

      Steps to reproduce:

      1. Create empty database in Oracle
      2. Execute script schema.sql
      3. Execute script images.sql
      4. Execute script data.sql (generates errors)

      Result:
      See attached screenshots
      See log file data_script_error.log

        1. data_script_error.log
          38 kB
          Thomas Oftring
        2. mysql_create_items_table.sql
          4 kB
          Thomas Oftring
        3. oracle_create_items_table.sql
          4 kB
          Thomas Oftring
        4. postgresql_create_items_table.sql
          4 kB
          Thomas Oftring
        5. Screenshot_error_template_hp_ilo_import.png
          326 kB
          Thomas Oftring
        6. Screenshot_error_template_oracle_import.png
          331 kB
          Thomas Oftring
        7. Screenshot_error_template_tel_asterisk_import.png
          180 kB
          Thomas Oftring
        8. screenshot-1.png
          99 kB
          Alexander Vladishev
        9. Screenshot 2021-10-18 at 01.05.49.png
          9 kB
          Alexey Pustovalov
        10. sqlite_create_items_table.sql
          4 kB
          Thomas Oftring
        11. template_db_oracle_odbc.xml
          146 kB
          Thomas Oftring
        12. template_server_hp_ilo_snmp.xml
          116 kB
          Thomas Oftring
        13. template_tel_asterisk_http.xml
          57 kB
          Thomas Oftring

            alarionovs Aleksandrs Larionovs (Inactive)
            thomas.oftring Thomas Oftring
            Team INT
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: