Ad Widget

Collapse

Monitoring Oracle by ODBC.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akbar415
    Senior Member
    • May 2015
    • 119

    #1

    Monitoring Oracle by ODBC.

    Hello.


    I need to monitor a few oracle databases. The problem is:
    I can't use zabbix agent. It's a EXADATA and anything I want to install, I need authorization from Oracle - it's sucks.

    So, I tried follow this:

    and
    https://www.zabbix.com/documentation.../odbc_checks?s[]=odbc


    But without success. The zabbix documentation is about Mysql, the unixODBC just have pai version of Oracle driver.


    After that, I try make this by hand. I installed the Oracle client and configured as below.

    odbcinst.ini
    Code:
    [Oracle]
    Description     = ODBC for Oracle
    Driver          = /usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1
    Trace = yes
    TraceFile = /var/log/odbcoracle
    odbc.ini
    Code:
    [ora07]
    Driver = Oracle
    Database = //oracle07:1521/ora07
    Port      = 1521
    UserID = My_db_user
    Password = my_password
    the command isql -v ora07
    Code:
    [IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
    [ISQL]ERROR: Could not SQLConnect

    ANybody can help me please.
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    i think ypou odbc.ini is wrong..

    try this:
    Code:
    [testdb]
    Description = testdb
    Driver      = PostgreSQL ANSI
    Server      = 172.16.22.18
    Servername      = 172.16.22.18
    User        = test-user
    Password    = test_321
    Port        =
    Database    = foobardb
    Trace       = no
    TraceFile   = /tmp/psqlodbc.log
    Debian-User

    Sorry for my bad english

    Comment

    • akbar415
      Senior Member
      • May 2015
      • 119

      #3
      Originally posted by Colttt
      i think ypou odbc.ini is wrong..

      try this:
      Code:
      [testdb]
      Description = testdb
      Driver      = PostgreSQL ANSI
      Server      = 172.16.22.18
      Servername      = 172.16.22.18
      User        = test-user
      Password    = test_321
      Port        =
      Database    = foobardb
      Trace       = no
      TraceFile   = /tmp/psqlodbc.log
      Thansk for help me with this. But this config is for PostgreSQL, I want to use with Oracle.

      Comment

      • akbar415
        Senior Member
        • May 2015
        • 119

        #4
        One step forward, two backward.

        I managed to make it work.

        First, I install unixODBC 2.3.2 ( I read in someplace that 2.3 don't work fine with oracle)
        Second. I set the variable TWO_TASK on linux to point to db_sib.

        So the comando isql -v ora07 works fine.

        But this brought me another issu.

        I have dozens of oracle databases server's. How can I monitor them if only one database is set on the environment variable $TWO_TASK?

        Comment

        • Colttt
          Senior Member
          Zabbix Certified Specialist
          • Mar 2009
          • 878

          #5
          thjis is just an example and i think its logical that you configure that example to you own enviroment!

          Code:
          [testdb]
          Description = [I]testdb[/I]
          Driver      = [I]driver-name specified in the odbcinst.ini[/I]
          Server      = [I]IP-ADRESSt-to-OracleDB[/I]
          Servername      =[I] ADRESSt-to-OracleDB[/I]
          User        = [I]Username[/I]
          Password    = [I]password[/I]
          Port        = [I]Port[/I]
          Database    = [I]which database you want to use with this dfn[/I]
          Trace       = [I]no[/I]
          TraceFile   =[I] /tmp/oracleodbc.log[/I]
          Debian-User

          Sorry for my bad english

          Comment

          • akbar415
            Senior Member
            • May 2015
            • 119

            #6
            Originally posted by Colttt
            thjis is just an example and i think its logical that you configure that example to you own enviroment!

            Code:
            [testdb]
            Description = [I]testdb[/I]
            Driver      = [I]driver-name specified in the odbcinst.ini[/I]
            Server      = [I]IP-ADRESSt-to-OracleDB[/I]
            Servername      =[I] ADRESSt-to-OracleDB[/I]
            User        = [I]Username[/I]
            Password    = [I]password[/I]
            Port        = [I]Port[/I]
            Database    = [I]which database you want to use with this dfn[/I]
            Trace       = [I]no[/I]
            TraceFile   =[I] /tmp/oracleodbc.log[/I]
            I know. But the configuration for oracle database has a few differences.
            Like:
            User (Postgre) = UserID (Oracle)
            Database is = //servename:1521/database.

            Anyway, me and a friend find a way to make it work. I will do some tests today, if everything works, I'll make a post on cookbook.


            Sorry fo my bad English

            Comment

            Working...