Ad Widget

Collapse

Zabbix (CentOS) + Oracle backend

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Peteris
    Member
    • Feb 2010
    • 89

    #1

    Zabbix (CentOS) + Oracle backend

    Hello,

    I'm having problem setting up CentOS 5.4 based Zabbix server with Oracle backend (on other server), when I try to compile zabbix server i get this error:

    Code:
    checking if Oracle support is enabled... no
    configure: error: Oracle OCI library not found
    I tried to point it to libsqlora8 directory - --with-oracle=/home/zabbix/libsqlora8 and got this error:

    Code:
    checking for Oracle OCI headers in /home/zabbix/libsqlora8/rdbms/public... not found
    checking if Oracle support is enabled... no
    configure: error: Oracle OCI library not found
    There is no such a folder: /home/zabbix/libsqlora8/rdbms/public

    How can I fix this?

    I tried to install Oracle Instant Client, it didn't help either:
    • oracle-instantclient-basic-10.2.0.3-1.x86_64.rpm
    • oracle-instantclient-devel-10.2.0.3-1.x86_64.rpm


    Maybe there is some kind of step by step manual how to compile Zabbix with Oracle support on dedicated servers?

    Thanks a lot!
  • Peteris
    Member
    • Feb 2010
    • 89

    #2
    Nobody has no idea?

    Comment

    • untergeek
      Senior Member
      Zabbix Certified Specialist
      • Jun 2009
      • 512

      #3
      First off, the documentation still has old stuff. Libsqlora8 is deprecated. You need the official OCI libraries, which can come from the Oracle Instant Client.

      I installed all of these:
      oracle-instantclient11.2-basic-11.2.0.1.0-1.x86_64.rpm
      oracle-instantclient11.2-devel-11.2.0.1.0-1.x86_64.rpm
      oracle-instantclient11.2-jdbc-11.2.0.1.0-1.x86_64.rpm
      oracle-instantclient11.2-odbc-11.2.0.1.0-1.x86_64.rpm
      oracle-instantclient11.2-sqlplus-11.2.0.1.0-1.x86_64.rpm
      Then I compiled with these options (yours may vary):
      ./configure --enable-server --with-oracle-include=/usr/include/oracle/11.2/client64 --with-oracle-lib=/usr/lib/oracle/11.2/client64/lib --with-net-snmp --with-libcurl --with-openipmi --enable-agent --enable-proxy
      This is with RedHat Enterprise Linux, so it should be about the same as with CentOS.

      Comment

      • Peteris
        Member
        • Feb 2010
        • 89

        #4
        @untergeek thanks a lot, I'll test it tomorrow.

        Comment

        • Peteris
          Member
          • Feb 2010
          • 89

          #5
          Everything work great now (THANK YOU A LOT), except one thing, I can't get zabbix started after reboot automatically. No problems starting it manually.

          I got this error:
          1597:20100708:100425.190 [Z3001] Connection to database '//HOSTNAME.DOMAIN.COM:1521/zabbix' failed: [-1] ORA-12154: TNS:could not resolve the connect identifier specified

          Comment

          • untergeek
            Senior Member
            Zabbix Certified Specialist
            • Jun 2009
            • 512

            #6
            Do you have a tnsnames.ora with that entry? Not only that, is your zabbix install aware of the Oracle environment? I start zabbix with a script to ensure this is set up.


            start_zabbix_server.sh
            Code:
            #!/bin/bash
            
            ORACLE_HOME=/usr/lib/oracle/11.2/client64
            export ORACLE_HOME
            PATH=$ORACLE_HOME/bin:$PATH:.
            export PATH
            LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH
            export LD_LIBRARY_PATH
            ORACLE_SID=(your SID here) 
            export ORACLE_SID
            
            /usr/local/sbin/zabbix_server
            You may have to create this path/file for this to work (I had to create the network/admin directories as client64 was already there).

            /usr/lib/oracle/11.2/client64/network/admin/tnsnames.ora
            Code:
            (your SID here) =
            (DESCRIPTION =
            	(ADDRESS_LIST =
            	(ADDRESS = (PROTOCOL = TCP)(HOST = [your FQDN here])(PORT = [your PORT here]))
            	)
            	(CONNECT_DATA =
            		(SID = [your SID here])
            	)
            )

            Comment

            • Peteris
              Member
              • Feb 2010
              • 89

              #7
              Actually everything works fine when service is started manually (no errors):

              /etc/init.d/zabbix_server start

              Seems that there is problem with zabbix_service starting before network card is up:

              1597:20100708:100425.190 [Z3001] Connection to database '//hostname.domain.com:1521/zabbix' failed: [-1] ORA-12154: TNS:could not resolve the connect identifier specified
              After I entered a host name of oracle DB server in hosts file, and server doesn't get it using DNS server error have changed:

              1589:20100708:101740.298 [Z3001] Connection to database '//hostname.domain.com:1521/zabbix' failed: [-1] ORA-12543: TNS:destination host unreachable
              Is there any way to delay automatic start of zabbix_server service?

              Comment

              • untergeek
                Senior Member
                Zabbix Certified Specialist
                • Jun 2009
                • 512

                #8
                Are you starting as a service or via the init scripts?

                If it's in the init scripts, you could just make it a 99 number, e.g.

                /etc/rc3.d/S99zabbix_server

                If you have it starting as a service, I'm not sure what the answer is.

                Comment

                Working...