Ad Widget

Collapse

zabbix to oracle backend connection problem

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

    #1

    zabbix to oracle backend connection problem

    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?
  • mirddin
    Junior Member
    • Nov 2013
    • 22

    #2
    I've compiled with oracle-instantclient and without unixodbc.

    ./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

    Comment

    Working...