After the new Zabbix configuration, the company all the host is through automatic registration completed the addition of network equipment and its templates from the old Zabbix export template, and then import into the new Zabbix system. Some application monitoring needs to be re-added.
The Oracle monitor was programmed to extract the monitored values from the script and then sender to the server to monitor; and then I couldn't find the old monitoring script, consulted the DBA colleague, said that Oracle should have a specific Zabbix monitoring plug-in, Baidu once found the Orabbix plug-in, then go to look at official documents.
Orabbix requires a Java runtime environment, so the JDK needs to be installed.
Add Zabbix User
First create the Zabbix user in Oracle, you can use the following script;
CREATE USER zabbixidentified by<replace with password>default tablespace userstemporary tablespace tempprofile defaultaccount UNLOCK; GRANT ALTER SESSION to ZABBIX; GRANT CREATE SESSION to ZABBIX; GRANT CONNECT to ZABBIX; ALTER USER ZABBIX DEFAULT ROLE all; GRANT SELECT on v_$instance to ZABBIX; GRANT SELECT on dba_users to ZABBIX; GRANT SELECT on v_$log_history to ZABBIX; GRANT SELECT on V_$parameter to ZABBIX; GRANT SELECT on SYS. Dba_audit_session to ZABBIX; GRANT SELECT on V_$lock to ZABBIX; GRANT SELECT on Dba_registry to ZABBIX; GRANT SELECT on V_$librarycache to ZABBIX; GRANT SELECT on V_$sysstat to ZABBIX; GRANT SELECT on V_$parameter to ZABBIX; GRANT SELECT on V_$latch to ZABBIX; GRANT SELECT on V_$pgastat to ZABBIX; GRANT SELECT on V_$sgastat to ZABBIX; GRANT SELECT on V_$librarycache to ZABBIX; GRANT SELECT on v_$process to ZABBIX; GRANT SELECT on Dba_data_files to ZABBIX; GRANT SELECT on Dba_temp_files to ZABBIX; GRANT SELECT on Dba_free_space to ZABBIX; GRANT SELECT on v_$system_event to ZABBIX;
If you are using the oracle11g version, you will also need to include the following:
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;
Install deployment Orabbix
mkdir /usr/local//usr/local/Orabbixwget https:// Jaist.dl.sourceforge.net/project/orabbix/orabbix-1.2.3.zipUnzip orabbix-1.2. 3. zip
/usr/local/orabbix/run.sh
The Orabbix script in the INIT.D directory, which is the init script, does not need to be changed without this feature. Orabbix in the script is assigned to the installation path, the default is Orabbix=/opt/orabbix, you need to change to the path you installed, according to my earlier deployment, so change to Orabbix=/usr/local/orabbix.
The run.sh script is a Java command, and if your JDK is compiled and installed by the source code, you need to change the Java script to the absolute path to Java.
Configuration file
Conf directory is a configuration file sample, need to configure the CP a copy
CP /user/local/orabbix/conf//user/local/orabbix/conf/config.props
#comma separed List of Zabbix serverszabbixserverlist =zabbix_serverzabbixserver1.address=172.85.10.51zabbixserver1.port=10051#ZabbixServer2. Address=Ip_address_of_zabbix_server#zabbixserver2.port=port_of_zabbix_server#pidfileorabbixdaemon.pidfile =./logs/ orabbix.pid#frequency of item's Refreshorabbixdaemon.sleep=300#MaxThreadNumber should be>=than the number of your databasesorabbixdaemon.maxthreadnumber =100#put here your databasesincha comma separated listdatabaselist =172.87.100.11,172.87.100.12#Configuration of Connection pool#ifNot specified Orabbis are going to use default values (hardcoded)#Maximum number of active connection inside pooldatabaselist.maxactive =10#The Maximum number of milliseconds that the pool wouldwait# (when there is no available connections) fora connection to being returned #before throwing an exception, or<=0Towaitindefinitely. databaselist.maxwait =100databaselist.maxidle=1#defineHere your connection string for each databaseDb1.url=jdbc:oracle:thin: @server .domain.example.com:<listener_port>:D b1db1. user=zabbixdb1.password= Zabbix_password#Those values are optionalsifNot specified Orabbix are going to use the general valuesDB1. Maxactive =10DB1. MAXWAIT=100DB1. MAXIDLE=1DB1. querylistfile=./conf/ query.props#pay1172.87.100.11.url=jdbc:oracle:thin:@172.87.100.11:1521:pay1172.87.100.11.user=zabbix_oracle_ user172.87.100.11.password= zabbix_oracle_passwd#172.87.100.11.maxactive=10172.87.100.11.maxwait=100172.87.100.11.maxidle=1172.87.100.11.querylistfile=./ conf/ query.props#pay2172.87.100.12.url=jdbc:oracle:thin:@172.87.100.12:1521:pay2172.87.100.12.user=zabbix_oracle_ user172.87.100.12.password= zabbix_oracle_passwd#172.87.100.12.maxactive=10172.87.100.12.maxwait=100172.87.100.12.maxidle=1172.87.100.12.querylistfile=./ Conf/query.props
After the configuration is complete, you can start the
/usr/local/orabbix/run.sh
Ps-ef | grep Orabbix//Check to see if it started successfully
Front-end configuration
/usr/local/orabbix below there is a template directory, which is loaded with Zabbix templates, the template moved to the local machine, and then landed Zabbix, the template imported into, you can configure the machine.
zabbix3.4.6 's monitoring Oracle