Thursday, December 18, 2014

Setup Zabbix on Ubuntu for Postgresql connection

1. Install unixODBC >sudo apt-get install unixODBC
2. Install postgresql odbc driver >sudo apt-get install postgresql-odbc
3. Setup /etc/odbc.ini
[test]
Description = 192.168.8.220 test
Driver = postgresql
Servername = 192.168.8.220
Port = 5432
Database = db_name

4. Setup /etc/odbcinst.ini
[postgresql]
Description = ODBC for postgresql
Driver = /usr/lib/x86_64-linux-gnu/odbc/psqlodbca.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libodbcpsqlS.so

Test:
>isql test your_name your_password -v

In Zabbix, add database monitor:
key = db.odbc.select[some_name,test]

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.