http://www.smartmarmot.com/product/orabbix/
To be done on Oracle side
CREATE USER zabbix IDENTIFIED BY zabbix DEFAULT TABLESPACE SYSTEM TEMPORARY TABLESPACE TEMP PROFILE DEFAULT ACCOUNT UNLOCK; GRANT CONNECT TO zabbix; GRANT RESOURCE TO zabbix; ALTER USER zabbix DEFAULT ROLE ALL; GRANT SELECT ANY TABLE TO zabbix; GRANT CREATE SESSION TO zabbix; GRANT SELECT ANY DICTIONARY TO zabbix; GRANT UNLIMITED TABLESPACE TO zabbix; GRANT SELECT ANY DICTIONARY TO zabbix; exec dbms_network_acl_admin.create_acl(acl => 'resolve.xml',description => 'resolve acl', principal =>'ZABBIX', is_grant => true, privilege => 'resolve'); exec dbms_network_acl_admin.assign_acl(acl => 'resolve.xml', host =>'*'); commit;
To be done on Zabbix side
Install orabbix
mkdir /opt/orabbix cd /opt/orabbix wget "http://downloads.sourceforge.net/project/orabbix/orabbix-1.2.3.zip?r=http%3A%2F%2Fwww.smartmarmot.com%2Fproduct%2Forabbix%2Fdownload%2F&ts=1451480795&use_mirror=skylink" mv orabbix-1.2.3.zip\?r\=http\:%2F%2Fwww.smartmarmot.com%2Fproduct%2Forabbix%2Fdownload%2F\&ts\=1451480795\&use_mirror\=skylink orabbix-1.2.3.zip chmod +x init.d/orabbix chmod +x run.sh cat ./template/Orabbix_export_full.xml mv /opt/orabbix/conf/config.props.sample /opt/orabbix/conf/config.props vi /opt/orabbix/conf/config.props cp init.d/orabbix /etc/init.d/orabbix /sbin/chkconfig orabbix on /etc/init.d/orabbix start
Configure orabbix
/opt/orabbix/conf/config.props
#comma separed list of Zabbix servers ZabbixServerList=ZabbixServer ZabbixServer.Address=zabbix-server.example.com ZabbixServer.Port=10051 #pidFile OrabbixDaemon.PidFile=./logs/orabbix.pid #frequency of item's refresh OrabbixDaemon.Sleep=300 #MaxThreadNumber should be >= than the number of your databases OrabbixDaemon.MaxThreadNumber=10 #put here your databases in a comma separated list DatabaseList=DEV,QA,PROD #Configuration of Connection pool #if not specified Orabbis is going to use default values (hardcoded) #Maximum number of active connection inside pool DatabaseList.MaxActive=10 #The maximum number of milliseconds that the pool will wait #(when there are no available connections) for a connection to be returned #before throwing an exception, or <= 0 to wait indefinitely. DatabaseList.MaxWait=100 DatabaseList.MaxIdle=1 DefaultUser = zabbix DefaultPassword = zabbix #define here your connection string for each database DEV.Url=jdbc:oracle:thin:@db-dev.example.com:1521:DEV DEV.QueryListFile=./conf/query.props QA.Url=jdbc:oracle:thin:@db-qa.example.com:1521:QA QA.QueryListFile=./conf/query.props PROD.Url=jdbc:oracle:thin:@db-prod.example.com:1521:PROD PROD.QueryListFile=./conf/query.props
Import template
vi ./template/Orabbix_export_full.xml
Configuration / Templates / Import
Configure databases on Zabbix
- Import oracle template for Zabbix (see sections below)
- Add host with name that is match orrabix config (PROD, QA, DEV)
- Add oracle template to host.
- Configure screens and other.
Orabbix triggers tuning
Configuration -> Templates -> Oracle -> Triggers
Reduce Lock alert level
Locks on {HOSTNAME} exist for at least 10 minutes {Template_Oracle:locks.str(none,#5)}=0
Reduce Active sessions warning level
Active Session {HOSTNAME} more than 50 for last 6 min {Template_Oracle:session_active.avg(#3)}>50