Ad Widget

Collapse

Zabbix 3.2 - I can't query oracle database

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • LITWIN
    Junior Member
    • Nov 2016
    • 16

    #16
    I don't tested it personally due to problems with compilation with mysql static libraries where I use mariadb database, so we depend on GPegel check.

    My own logs (in first post of this thread) are created with max logging level (DebugLevel=5).
    I think we have same entries in log as I got.

    If you can give me and rpm to install with version to check (or zabbix server exe) I can do myself those tests.
    Last edited by LITWIN; 05-12-2016, 14:48.

    Comment

    • glebs.ivanovskis
      Senior Member
      • Jul 2015
      • 237

      #17
      I meant logs from 3.2.2rc1.

      Comment

      • GPegel
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2015
        • 113

        #18
        This is a part of the log file generated on version 3.2.2rc1:

        The item name is: Test_ODBC4
        The item type is: Database Monitor
        The key is: db.odbc.select[Test_ODBC4,SOME_TABLE_SCHEMA]
        Type of information is: Numeric (Float)
        Update Interval is: 30 seconds
        Store value is: As is

        The result is:
        Code:
        21422:20161130:192740.519 Item [ODBC Test:db.odbc.select[Test_ODBC4,SOME_TABLE_SCHEMA]] error: Received value [??g?] is not suitable for value type [Numeric (float)]
         21422:20161130:192740.519 End of get_value():NOTSUPPORTED
        This is the log:

        Code:
        21422:20161130:192739.555 In get_values()
         21422:20161130:192739.555 In DCconfig_get_poller_items() poller_type:0
         21422:20161130:192739.555 End of DCconfig_get_poller_items():1
         21422:20161130:192739.555 In substitute_key_macros() data:'db.odbc.select[Test_ODBC4,SOME_TABLE_SCHEMA]'
         21422:20161130:192739.555 End of substitute_key_macros():SUCCEED data:'db.odbc.select[Test_ODBC4,SOME_TABLE_SCHEMA]'
         21422:20161130:192739.555 In substitute_simple_macros() data:'select count(*) FOUTEN_ODBC_Application from OWNER.master_table 
        where creation_timestamp >= sysdate-1
        and application = 'ODBC_Application' 
        AND foutmelding not like '%Customer_ID: % not found%';'
         21422:20161130:192739.555 In substitute_simple_macros() data:EMPTY
         21422:20161130:192739.555 In substitute_simple_macros() data:EMPTY
         21422:20161130:192739.555 In get_value() key:'db.odbc.select[Test_ODBC4,SOME_TABLE_SCHEMA]'
         21422:20161130:192739.555 In get_value_db() key_orig:'db.odbc.select[Test_ODBC4,SOME_TABLE_SCHEMA]'
         21422:20161130:192739.555 In db_odbc_select() query:'select count(*) FOUTEN_ODBC_Application from OWNER.master_table 
        where creation_timestamp >= sysdate-1
        and application = 'ODBC_Application' 
        AND foutmelding not like '%Customer_ID: % not found%';'
         21422:20161130:192739.555 In odbc_DBconnect() db_dsn:'SOME_TABLE_SCHEMA' user:''
         21423:20161130:192739.558 __zbx_zbx_setproctitle() title:'poller #4 [got 0 values in 0.000052 sec, getting values]'
         21423:20161130:192739.558 In get_values()
         21423:20161130:192739.558 In DCconfig_get_poller_items() poller_type:0
         21423:20161130:192739.558 End of DCconfig_get_poller_items():1
         21438:20161130:192740.038 In DCsync_history() history_num:1
         21438:20161130:192740.038 __zbx_zbx_setproctitle() title:'history syncer #2 [synced 0 items in 0.000010 sec, idle 1 sec]'
         21439:20161130:192740.039 __zbx_zbx_setproctitle() title:'history syncer #3 [synced 1 items in 0.002783 sec, idle 1 sec]'
         21422:20161130:192740.515 odbc_DBselect() selected 1 columns
         21422:20161130:192740.515 End of odbc_DBselect()
         21422:20161130:192740.515 In odbc_DBfetch()
         21422:20161130:192740.516 odbc_Diag(): rc_msg:'SQL_SUCCESS_WITH_INFO' rec_nr:1 sql_state:'01004' native_err_code:0 err_msg:'[Oracle][ODBC]String data, right truncated.'
         21422:20161130:192740.516 odbc_DBfetch() fetched [0 col]: '0^Gêgx^?'
         21422:20161130:192740.516 End of odbc_DBfetch()
         21422:20161130:192740.519 End of db_odbc_select():NOTSUPPORTED
         21422:20161130:192740.519 End of get_value_db():NOTSUPPORTED
         21422:20161130:192740.519 Item [ODBC Test:db.odbc.select[Test_ODBC4,SOME_TABLE_SCHEMA]] error: Received value [?^G?g?^?] is not suitable for value type [Numeric (float)]
         21422:20161130:192740.519 End of get_value():NOTSUPPORTED
         21422:20161130:192740.519 In activate_host() hostid:10105 itemid:25389 type:11
         21422:20161130:192740.519 End of activate_host()
         21422:20161130:192740.519 End of get_values():1
         21422:20161130:192740.519 In get_values()
         21422:20161130:192740.519 In DCconfig_get_poller_items() poller_type:0
         21422:20161130:192740.519 End of DCconfig_get_poller_items():1
        Last edited by GPegel; 06-12-2016, 18:06.

        Comment

        • saiprakash244
          Junior Member
          • Dec 2016
          • 1

          #19
          Need help on Installing zabbix with oracle as db

          Hello !!

          I am Sai and am new to zabbix. I am trying to install zabbix 3.0.5 in my local virtual machine. I have done the following steps

          1. My working environment for your understanding:
          Distributor ID: OracleServer
          Description: Oracle Linux Server release 6.8
          Release: 6.8
          Codename: n/a

          2. created zabbix group
          3. created zabbix user and added to zabbix group
          4. downloaded and untarred the tarball for zabbix-3.0.5
          4. followed below steps to create a dba user on oracle 11g express edition
          create user zabbix identified by xxxxx default tablespace zabbix;
          alter user zabbix quota unlimited on zabbix;
          grant resource,create session to zabbix;
          grant create any directory to zabbix;

          5.Logging into DB:
          sqlplus zabbix/xxxxx

          SQL*Plus: Release 11.2.0.2.0 Production on Wed Dec 7 15:19:44 2016
          Copyright (c) 1982, 2011, Oracle. All rights reserved.
          Connected to:
          Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

          6. after login to DB, got the proper out put with out any error messages when I ran the below script file @/home/zabbix/zabbix-3.0.5/database/oracle/schema.sql

          7. next, I have changed the path of CREATE OR REPLACE DIRECTORY image_dir AS '/home/zabbix/zabbix/create/output_png'
          /

          to

          CREATE OR REPLACE DIRECTORY image_dir AS '/home/zabbix/zabbix-3.0.5/misc/images'
          /

          after save and quit the file, again logging in to zabbix database by execuiting sqlplus zabbix/xxxxx

          when I try to run the below script file
          @/home/zabbix/zabbix-3.0.5/database/oracle/images.sql

          I got the below error

          SQL> @/home/zabbix/zabbix-3.0.5/database/oracle/images.sql

          Directory created.


          Procedure created.

          BEGIN
          *
          ERROR at line 1:
          ORA-22288: file or LOB operation FILEOPEN failed
          Permission denied
          ORA-06512: at "SYS.DBMS_LOB", line 805
          ORA-06512: at "ZABBIX.LOAD_IMAGE", line 8
          ORA-06512: at line 2



          Procedure dropped.

          DROP DIRECTORY image_dir
          *
          ERROR at line 1:
          ORA-01031: insufficient privileges

          Please help me how to pass this hurdle!! Or suggest me some pointers to get solution for the above problem.

          Comment

          • LITWIN
            Junior Member
            • Nov 2016
            • 16

            #20
            Error what got GPegel is same as my own in first post on this thread.

            Comment

            • glebs.ivanovskis
              Senior Member
              • Jul 2015
              • 237

              #21
              Dear GPegel and LITWIN!

              The log you provided was written by Zabbix 3.2.1 or lower. It is not the latest version (3.2.2rc1 or 3.2.2). I can tell it by this line:
              21422:20161130:192740.516 odbc_DBfetch() fetched [0 col]: '0^Gêgx^?'
              In the latest versions Zabbix additionally logs fetched result type identifier in parentheses:
              Code:
              zabbix_log(LOG_LEVEL_DEBUG, "%s() fetched [%i col (%d)]: '%s'", __function_name, i, (int)col_type,
              				NULL == pdbh->row_data[i] ? "NULL" : pdbh->row_data[i]);

              Comment

              • GPegel
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Dec 2015
                • 113

                #22
                What the F***???

                Okay, I will give it another try! I will setup a fresh CentOS server and will only install the Zabbix 3.2.2.rc1 version.

                In my previous posts I updated the older version of Zabbix to 3.2.2rc1 so maybe something went wrong while updating.

                Anyway... I will give it a try and will keep you posted.

                Comment

                • GPegel
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Dec 2015
                  • 113

                  #23
                  I need to confess some thing... it works now!!!!

                  I compiled the 3.2.2rc1 version on a fresh CentOS server and the Database Monitor works like a charm now.

                  So I did not do a upgrade from earlier versions, just a fresh installation of Zabbix and now the ODBC data is comming in as it should. So I can say it´s solved indeed in this 3.2.2rc1 version!

                  Comment

                  • LITWIN
                    Junior Member
                    • Nov 2016
                    • 16

                    #24
                    I downloaded 3.2.2 from zabbix repo and finally it works!
                    Last edited by LITWIN; 12-12-2016, 10:03.

                    Comment

                    Working...