Hi,
After I successfuly installed OracleSQL driver and monitor some databases it is time to monitor MSSQL database. Unfortunalety it is not documented as well as OracleSQL.
isql -v wms01 <uid> <pwd>
This command in linux cmd of Zabbix 4.0.4 server is working correctly (MSSQL). I can connect to remote server and request SQL commands. There is no problem here.
But in Zabbix console I have an error:
Cannot connect to ODBC DSN: [SQL_ERROR]:[IM002][0][[unixODBC][Driver Manager]Data source name not found, and no default driver specified]
My configuration in CentOS 7:
Unfortunately Zabbix can not find MSSQL driver in Zabbix console and return Cannot connect to ODBC DSN: [SQL_ERROR]:[IM002][0][[unixODBC][Driver Manager]Data source name not found, and no default driver specified] error. isql command is working correctly as well.
It seems that DSN wms01 is not visible in Zabbix.
What can I do else to connect Zabbix user to driver and MSSQL Database?
After I successfuly installed OracleSQL driver and monitor some databases it is time to monitor MSSQL database. Unfortunalety it is not documented as well as OracleSQL.
isql -v wms01 <uid> <pwd>
This command in linux cmd of Zabbix 4.0.4 server is working correctly (MSSQL). I can connect to remote server and request SQL commands. There is no problem here.
But in Zabbix console I have an error:
Cannot connect to ODBC DSN: [SQL_ERROR]:[IM002][0][[unixODBC][Driver Manager]Data source name not found, and no default driver specified]
My configuration in CentOS 7:
- /etc/sysconfig/zabbix-server - here I put environment variables for Zabbix user (for OracleSQL and MSSQL Driver)
Code:LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/oracle/12.1/client64/lib PATH=$PATH:/usr/bin:/bin:/sbin:/usr/lib/oracle/12.1/client64/bin:[U]/opt/mssql-tools/bin[/U] ORACLE_HOME=/usr/lib/oracle/12.1/client64 export LD_LIBRARY_PATH export PATH export ORACLE_HOME
- /root/.bash_profile - main environment variables config
Code:export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib:$LD_LIBRARY_PATH PATH=$PATH:/sbin:/bin:/usr/lib/oracle/12.1/client64/bin:/opt/mssql-tools/bin export ORACLE_HOME=/usr/lib/oracle/12.1/client64 export PATH
- /etc/odbcinst.ini - configuration of drivers
Code:[Oracle12c] Description=Oracle ODBC Driver Driver=/usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1 Trace=yes TraceFile=/var/log/odbcoracle [B][MSSQL17][/B] Description=Microsoft ODBC Driver 17 Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1 UsageCount=1
- /etc/odbc.ini - DSN configuration
I don knot why uid and pwd set in DSN config are not working for MSSQL driver. I neet do put it in isql command or zabbix item config.Code:[ifs7] Driver = Oracle12c DSN = Oracle12c Servername = xx.xx.xx.xx:xxxx/xxxxxxx Database = xx.xx.xx.xx:xxxx/xxxxxxx Port = xxxx UserID = xxxxxxxxxxxxxxxxx Password = xxxxxxxxxxxx DatabaseCharacterSet=UTF8 [B][wms01][/B] Driver = MSSQL17 DSN = MSSQL17 Server = tcp:xx.xx.xx.xx, xxxx Port = xxxx uid [COLOR=#B22222]#[I] - command not working[/I][/COLOR] pwd [COLOR=#B22222]#[I] - command not working[/I][/COLOR]
Unfortunately Zabbix can not find MSSQL driver in Zabbix console and return Cannot connect to ODBC DSN: [SQL_ERROR]:[IM002][0][[unixODBC][Driver Manager]Data source name not found, and no default driver specified] error. isql command is working correctly as well.
It seems that DSN wms01 is not visible in Zabbix.
What can I do else to connect Zabbix user to driver and MSSQL Database?
Comment