Ad Widget

Collapse

Environment variables with ODBC monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lassi.autio
    Junior Member
    • Mar 2016
    • 3

    #1

    Environment variables with ODBC monitoring

    I am trying to make ODBC monitoring to remote server's Oracle. However this needs updates to environment variables LD_LIBRARY_PATH and PATH. I updated ~/.profile but I get "Cannot connect to ODBC DSN:[SQL_ERROR]:[IM002][0][[unixODBC][Driver Manager]Data source name not found, and no default driver specified]|" in host's status. isql command runs successfully from command line.

    What should I do to make these LD_LIBRARY_PATH and PATH environment variables updated for host items?
  • lassi.autio
    Junior Member
    • Mar 2016
    • 3

    #2
    This problem is now fixed and it had nothing to do with environment variables. My issue was that Zabbix used /etc/odbc.ini and /etc/odbcinst.ini files. Whilst isql uses them from /usr/local/etc. So isql worked but Zabbix didn't.

    Comment

    • Tec_Technician
      Member
      • Dec 2015
      • 39

      #3
      Hello lassi.autio and Zabbix Masters!!

      I just have the same error. But i don't see clearly the explanation about the files. Somebody could explain it to me or tell me where to find information about this issue??

      I have the following sistems:

      Zabbix server 3.0.0

      Zabblix client 3.0.1
      BBDD Oracle on AWS

      Thanks a lot in advance.

      Comment

      • mortuletti
        Member
        • May 2016
        • 76

        #4
        Hi!
        I cannot provide direct information for Oracle, but idea is the same.
        For MySQL first need to be installed ODBC driver and mysql-connector-odbc
        1. check list of available ODBC drivers in the /etc/odbcinst.ini file. On attached example we have [MySQL] - this is name of ODBC driver.
        2. make file /etc/odbc.ini and it should contain (example attached):

        [dsnname] - this name will be used in Zabbix as DSN
        Driver = MySQL - driver name from odbcinst.ini file
        Server = 127.0.0.1 - where to connect
        Port = 3306
        Database = DBname

        If everything is ok, database should be available by running "isql dsnname" command.
        Br, Alexander
        Attached Files

        Comment

        Working...