Ad Widget

Collapse

zabbix 2.4.3 + Oracle Linux 7 with oracle database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pantera
    Member
    • Dec 2014
    • 39

    #1

    zabbix 2.4.3 + Oracle Linux 7 with oracle database

    Help please
    I'm trying install zabbix 2.4.3 on Oracle Linux 7 andzabbix server should connect to oracle database to store its data
    but I face with this issue

    make[3]: Nothing to be done for `all'.
    make[3]: Leaving directory `/home/admin/Desktop/zabbix-2.4.3/src/zabbix_server/selfmon'
    Making all in vmware
    make[3]: Entering directory `/home/admin/Desktop/zabbix-2.4.3/src/zabbix_server/vmware'
    make[3]: Nothing to be done for `all'.
    make[3]: Leaving directory `/home/admin/Desktop/zabbix-2.4.3/src/zabbix_server/vmware'
    make[3]: Entering directory `/home/admin/Desktop/zabbix-2.4.3/src/zabbix_server'
    gcc -DZABBIX_DAEMON -DSYSCONFDIR="\"/usr/local/etc\"" -DDATADIR="\"/usr/local/share\"" -DLIBDIR="\"/usr/local/lib\"" -I../../src/libs/zbxdbcache -g -O2 -I/home/admin/Desktop/instantclient_12_1//rdbms/public -I/home/admin/Desktop/instantclient_12_1//rdbms/demo -I/usr/include/libxml2 -I/usr/include -I/usr/local/include -I/usr/lib64/perl5/CORE -I. -I/usr/include -I/usr/local/include -I/usr/local/include -L/home/admin/Desktop/instantclient_12_1//lib -L/usr/lib64 -L/usr/lib64 -L/usr/local/lib -L/usr/local/lib -rdynamic -o zabbix_server zabbix_server-actions.o zabbix_server-operations.o zabbix_server-events.o zabbix_server-scripts.o zabbix_server-server.o alerter/libzbxalerter.a dbsyncer/libzbxdbsyncer.a dbconfig/libzbxdbconfig.a discoverer/libzbxdiscoverer.a pinger/libzbxpinger.a poller/libzbxpoller.a housekeeper/libzbxhousekeeper.a timer/libzbxtimer.a trapper/libzbxtrapper.a snmptrapper/libzbxsnmptrapper.a httppoller/libzbxhttppoller.a watchdog/libzbxwatchdog.a escalator/libzbxescalator.a proxypoller/libzbxproxypoller.a selfmon/libzbxselfmon.a vmware/libzbxvmware.a ../../src/libs/zbxsysinfo/libzbxserversysinfo.a ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a ../../src/libs/zbxsysinfo/simple/libsimplesysinfo.a ../../src/libs/zbxlog/libzbxlog.a ../../src/libs/zbxdbcache/libzbxdbcache.a ../../src/libs/zbxmemory/libzbxmemory.a ../../src/libs/zbxregexp/libzbxregexp.a ../../src/libs/zbxalgo/libzbxalgo.a ../../src/libs/zbxnix/libzbxnix.a ../../src/libs/zbxsys/libzbxsys.a ../../src/libs/zbxconf/libzbxconf.a ../../src/libs/zbxmedia/libzbxmedia.a ../../src/libs/zbxcommon/libzbxcommon.a ../../src/libs/zbxcrypto/libzbxcrypto.a ../../src/libs/zbxcomms/libzbxcomms.a ../../src/libs/zbxcommshigh/libzbxcommshigh.a ../../src/libs/zbxjson/libzbxjson.a ../../src/libs/zbxexec/libzbxexec.a ../../src/libs/zbxself/libzbxself.a ../../src/libs/zbxserver/libzbxserver.a ../../src/libs/zbxicmpping/libzbxicmpping.a ../../src/libs/zbxdbupgrade/libzbxdbupgrade.a ../../src/libs/zbxdbhigh/libzbxdbhigh.a ../../src/libs/zbxdb/libzbxdb.a ../../src/libs/zbxmodules/libzbxmodules.a -lclntsh -lnnz12 -liksemel -lxml2 -lodbc -lnetsnmp -lssh2 -lOpenIPMI -lOpenIPMIposix -lcurl -lm -ldl -lresolv
    ../../src/libs/zbxdbhigh/libzbxdbhigh.a(libzbxdbhigh_a-db.o): In function `zbx_db_insert_add_values_dyn':
    /home/admin/Desktop/zabbix-2.4.3/src/libs/zbxdbhigh/db.c:2201: undefined reference to `zbx_strlen_utf8_n'
    collect2: error: ld returned 1 exit status
    make[3]: *** [zabbix_server] Error 1
    make[3]: Leaving directory `/home/admin/Desktop/zabbix-2.4.3/src/zabbix_server'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/admin/Desktop/zabbix-2.4.3/src/zabbix_server'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/admin/Desktop/zabbix-2.4.3/src'
    make: *** [all-recursive] Error 1

    what should I do?
    Anyone installed zabbix 2.4.3 on Oracle Linux 7 with oracle database on the network?
    Last edited by pantera; 07-01-2015, 16:04.
  • pantera
    Member
    • Dec 2014
    • 39

    #2
    cat /home/admin/Desktop/zabbix-2.4.3/src/libs/zbxdbhigh/db.c | grep zbx_strlen_utf8_n
    zbx_strlen_utf8_n(value->str, field->length));

    also mentioned here https://www.zabbix.com/forum/showthread.php?t=47941
    but I cannot solve it
    Last edited by pantera; 07-01-2015, 16:15.

    Comment

    • pantera
      Member
      • Dec 2014
      • 39

      #3
      installed pre-zabbix-2.4.4rc1-51402.tar and solved

      Comment

      • pantera
        Member
        • Dec 2014
        • 39

        #4
        How t configure zabbix_server.conf for oracle connection
        zabbix can not connect to oracle database , thus can not store data

        help please

        Comment

        • pantera
          Member
          • Dec 2014
          • 39

          #5
          I compiled zabbix by this way:

          # export PATH=$PATH:/home/admin/Desktop
          # export LD_LIBRARY_PATH=/home/admin/Desktop/instantclient_12_1
          # export PATH=$PATH:$LD_LIBRARY_PATH

          # ./configure --enable-server --enable-agent --enable-ipv6 --with-net-snmp --with-libcurl --with-ssh2 --with-openipmi --with-java --with-libxml2 --with-jabber --with-unixodbc --with-oracle=yes

          # make && make install


          My TNS file:

          MY_DB=
          (DESCRIPTION=
          (ADDRESS=
          (PROTOCOL=TCP)
          (HOST=10.22.22.22)
          (PORT=1521)
          )
          (CONNECT_DATA=
          (SERVER=dedicated)
          (SERVICE_NAME=MYDB)
          )
          )


          zabbix_server.conf file:



          DebugLevel=4
          LogFile=/tmp/zabbix_server.log
          LogFileSize=5
          DBHost=10.22.22.22
          DBName=MYDB
          DBUser=zabbix
          DBPassword=zabbix
          DBPort=1521


          Log:

          73289:20150109:140134.007 End of zbx_mem_required_size() size:543
          73289:20150109:140134.007 In zbx_mem_create() descr:'history cache' param:'HistoryCacheSize' size:8388583
          73289:20150109:140134.007 zbx_shmget() removing existing shm_id:50102276
          73289:20150109:140134.007 valid user addresses: [0x7f0aad469170, 0x7f0aadc68fd8] total size: 8388200
          73289:20150109:140134.007 End of zbx_mem_create()
          73289:20150109:140134.007 In zbx_mem_required_size() size:0 chunks_num:1 descr:'history text cache' param:'HistoryTextCacheSize'
          73289:20150109:140134.007 End of zbx_mem_required_size() size:435
          73289:20150109:140134.007 In zbx_mem_create() descr:'history text cache' param:'HistoryTextCacheSize' size:16777216
          73289:20150109:140134.007 zbx_shmget() removing existing shm_id:50135049
          73289:20150109:140134.007 valid user addresses: [0x7f0aac469178, 0x7f0aad468ff0] total size: 16776824
          73289:20150109:140134.007 End of zbx_mem_create()
          73289:20150109:140134.007 In init_trend_cache()
          73289:20150109:140134.007 In zbx_mem_required_size() size:0 chunks_num:1 descr:'trend cache' param:'TrendCacheSize'
          73289:20150109:140134.007 End of zbx_mem_required_size() size:422
          73289:20150109:140134.007 In zbx_mem_create() descr:'trend cache' param:'TrendCacheSize' size:4194304
          73289:20150109:140134.007 zbx_shmget() removing existing shm_id:50167818
          73289:20150109:140134.007 valid user addresses: [0x7f0aac069170, 0x7f0aac468ff0] total size: 4193920
          73289:20150109:140134.007 End of zbx_mem_create()
          73289:20150109:140134.007 End of init_trend_cache()
          73289:20150109:140134.007 End of init_database_cache()
          73289:20150109:140134.007 In init_configuration_cache() size:8388608
          73289:20150109:140134.007 In zbx_mem_create() descr:'configuration cache' param:'CacheSize' size:7130317
          73289:20150109:140134.007 zbx_shmget() removing existing shm_id:50200587
          73289:20150109:140134.007 valid user addresses: [0x7f0aab99c170, 0x7f0aac068cc0] total size: 7129936
          73289:20150109:140134.007 End of zbx_mem_create()
          73289:20150109:140134.008 In zbx_strpool_create()
          73289:20150109:140134.008 In zbx_mem_create() descr:'string pool' param:'CacheSize' size:1258291
          73289:20150109:140134.008 zbx_shmget() removing existing shm_id:50233356
          73289:20150109:140134.008 valid user addresses: [0x7f0ab9fd8168, 0x7f0aba10b328] total size: 1257920
          73289:20150109:140134.008 End of zbx_mem_create()
          73289:20150109:140134.008 End of zbx_strpool_create()
          73289:20150109:140134.008 End of init_configuration_cache()
          73289:20150109:140134.008 In init_selfmon_collector()
          73289:20150109:140134.008 init_selfmon_collector() size:7072
          73289:20150109:140134.008 zbx_shmget() removing existing shm_id:50266125
          73289:20150109:140134.008 End of init_selfmon_collector() collector:0x7f0aba13c000
          73289:20150109:140134.008 In zbx_vc_init()
          73289:20150109:140134.008 In zbx_mem_required_size() size:0 chunks_num:1 descr:'value cache size' param:'ValueCacheSize'
          73289:20150109:140134.008 End of zbx_mem_required_size() size:427
          73289:20150109:140134.008 In zbx_mem_create() descr:'value cache size' param:'ValueCacheSize' size:8388608
          73289:20150109:140134.008 zbx_shmget() removing existing shm_id:50298894
          73289:20150109:140134.008 valid user addresses: [0x7f0aab19c170, 0x7f0aab99bff0] total size: 8388224
          73289:20150109:140134.008 End of zbx_mem_create()
          73289:20150109:140134.008 End of zbx_vc_init()
          73289:20150109:140134.008 In zbx_db_get_database_type()
          73289:20150109:140134.008 In DBconnect() flag:0
          73289:20150109:140134.012 [Z3001] connection to database '//10.22.22.22:1521/MYDB' failed: [-1]
          73289:20150109:140134.012 Cannot connect to the database. Exiting...


          Could anyone help me?
          I can connect to Oracle database via sqlplus. Also with odbc.

          2) How can I use odbc to use for zabbix to store its data to oracle database?

          Comment

          • pantera
            Member
            • Dec 2014
            • 39

            #6
            it seems nobody wants to help

            Comment

            • gleepwurp
              Senior Member
              • Mar 2014
              • 119

              #7
              HI Pantera,

              it's not as much as people don't want to help as people can't help with something they don't have...

              Using Zabbix with an oracle DB is feasible, but it's not used as much as MySQL/Postgres which is integrated Out-of-the-box, so the resource pool for helping you with Oracle is minimal.

              I've personally tried with Oracle Database, and it was too much of a hassle to get it running, I just went with MySQL.

              That way, I don't have to deal with TNSADMIN files and all the problems you're going through, and suffer some issues because some field types in Oracle have differing lengths and restrictions than those in MySQL, etc, etc..

              Unless you have a business restriction to use Oracle, I would strongly suggest you make it easy on yourself and switch over to MySQL. If not, well, the resource pool of people that can help is greatly reduced.

              G.

              Comment

              • pantera
                Member
                • Dec 2014
                • 39

                #8
                Originally posted by gleepwurp
                HI Pantera,

                it's not as much as people don't want to help as people can't help with something they don't have...

                Using Zabbix with an oracle DB is feasible, but it's not used as much as MySQL/Postgres which is integrated Out-of-the-box, so the resource pool for helping you with Oracle is minimal.

                I've personally tried with Oracle Database, and it was too much of a hassle to get it running, I just went with MySQL.

                That way, I don't have to deal with TNSADMIN files and all the problems you're going through, and suffer some issues because some field types in Oracle have differing lengths and restrictions than those in MySQL, etc, etc..

                Unless you have a business restriction to use Oracle, I would strongly suggest you make it easy on yourself and switch over to MySQL. If not, well, the resource pool of people that can help is greatly reduced.

                G.
                Yes, I know dealing with MySQL is asey, but my company demands to use oracle. Now My zabbix working with oracle. I installed it on Oracle Linux
                But know issue is I don't know how to make zabbix as a service to work on boot

                Comment

                • gleepwurp
                  Senior Member
                  • Mar 2014
                  • 119

                  #9
                  well, if you're running a recent version of Oracle Linux, you can use the following commands:

                  check the start up state:

                  Code:
                  chkconfig --list zabbix-server
                  this will give you a list of at which runlevel the zabbix-server will be running. It's probably all off right now.

                  If you issue the following command (as root):

                  Code:
                  chkconfig zabbix-server on
                  This will enable autostart of the zabbix-server at run levels 2-3-4-5...

                  G.

                  Comment

                  • mirddin
                    Junior Member
                    • Nov 2013
                    • 22

                    #10
                    Hi all!

                    Just as a topicstarter, I had to deploy Zabbix with Oracle backend.

                    The deployment is based on
                    Zabbix 2.4.4rc1
                    CentOS 6.4
                    Oracle InstantClient 12.1.0.2.0-1.x86_64

                    Oracle DB is installed on another host.

                    ./configure --enable-server --with-oracle --with-oracle-include=/usr/include/oracle/12.1/client64 --with-oracle-lib=/usr/lib/oracle/12.1/client64/lib --with-net-snmp --with-libcurl --with-openipmi --enable-agent --enable-proxy --e
                    nable-ipv6 --with-libxml2 --with-ssh2 --prefix=/opt/zabbix

                    So, everything works fine except language coding (UTF-8). That could be no problem but I have some WEB scenarios with result strings in local language

                    According to different forum threads I have to define NLS_LANG on the client side.
                    I've tried to define it in apachectl, tried to set mbstring.internal_encoding in php.ini, but still no progress

                    I consider this is not the Zabbix specific problem cause it's mentioned in different non-Zabbix forums in the http+php+Oracle context.

                    thanks beforehand!

                    PS The initial deployment was based on MySQL 5.6, but the performance was very poor. I had no other host for DB and my colleagues proposed to migrate to their Oracle DB.
                    Last edited by mirddin; 14-01-2015, 09:28. Reason: Reason for Oracle migration

                    Comment

                    • pantera
                      Member
                      • Dec 2014
                      • 39

                      #11
                      Originally posted by gleepwurp
                      well, if you're running a recent version of Oracle Linux, you can use the following commands:

                      check the start up state:

                      Code:
                      chkconfig --list zabbix-server
                      this will give you a list of at which runlevel the zabbix-server will be running. It's probably all off right now.

                      If you issue the following command (as root):

                      Code:
                      chkconfig zabbix-server on
                      This will enable autostart of the zabbix-server at run levels 2-3-4-5...

                      G.
                      without service files, this meth dont work
                      I used redhat 8.0 files from from zabbix 1.8 archive, works, bur restart does not work
                      I have to stop then start
                      there is some uknown conict between systemctl and chkconfig

                      Comment

                      • mirddin
                        Junior Member
                        • Nov 2013
                        • 22

                        #12
                        Originally posted by mirddin
                        So, everything works fine except language coding (UTF-8). That could be no problem but I have some WEB scenarios with result strings in local language
                        So, after countless changes, environment variable settings and so on, I've made such a workaround. It's not very elegant but operational.


                        # diff include/db.inc.php.ORIG include/db.inc.php
                        116c116
                        < $DB['DB'] = @oci_connect($DB['USER'], $DB['PASSWORD'], $connect);
                        ---
                        > $DB['DB'] = @oci_connect($DB['USER'], $DB['PASSWORD'], $connect, 'AL32UTF8');

                        Comment

                        • gleepwurp
                          Senior Member
                          • Mar 2014
                          • 119

                          #13
                          Originally posted by pantera
                          without service files, this meth dont work
                          I used redhat 8.0 files from from zabbix 1.8 archive, works, bur restart does not work
                          I have to stop then start
                          there is some uknown conict between systemctl and chkconfig

                          There are Service files within the RPM package of Zabbix 2.4.3... Maybe you can extract them and copy them over to your server...

                          G.

                          Comment

                          Working...