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

ORA-933 when using trends with zabbix plugin

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Grafana: 5.3.4
      Zabbix plugin: 3.9.1
      Zabbix: 3.2.4
      Oracle DB with the zabbix repository:12.2

      Hello.
      I have enabled the trends option on my zabbix data source with after=30d and range=30d.

      When I select the appropriate range on my dashboards to use trends (eg now -30d) I get “No data points” on my graphs.

      In Oracle’s alert log, I get the following messages, relevant to this:
      WARNING: too many parse errors, count=500 SQL hash=0x248f5006
      PARSE ERROR: ospid=26861, error=933 for statement:
      2019-02-28T13:06:49.851786+02:00
      SELECT t.* FROM trends_uint AS t WHERE t.clock>=:“SYS_B_0” AND t.clock<=:“SYS_B_1” AND t.itemid=:“SYS_B_2”
      Additional information: hd=0x1bb4211f0 phd=0x1c13b4ec0 flg=0x28 cisid=84 sid=84 ciuid=84 uid=84

      These errors are:
      ORA-00933: SQL command not properly ended

      So, the above query is not executed in Oracle:

      SQL> SELECT t.* FROM trends_uint AS t WHERE t.clock>=1536613200 AND t.clock<=1536614200 AND t.itemid=93624;
      SELECT t.* FROM trends_uint AS t WHERE t.clock>=1536613200 AND t.clock<=1536614200 AND t.itemid=93624
      *
      ERROR at line 1:
      ORA-00933: SQL command not properly ended

      “AS” should not be used for table aliases in Oracle.

      The correct syntax is:
      SQL> SELECT t.* FROM trends_uint t WHERE t.clock>=1536613200 AND t.clock<=1536614200 AND t.itemid=93624;

      ITEMID CLOCK NUM VALUE_MIN VALUE_AVG VALUE_MAX
      93624 1536613200 12 5843 7709 9779

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zabbix.support Zabbix Support Team
                Reporter:
                lefterhs Lefteris Tsekouras
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: