1 download
Download Address:
http://www.smartmarmot.com/product/orabbix/download/
2 Grant executable permissions to a file
#chmod +x/opt/orabbix-r
#chmod +x/opt/orabbix/run.sh
3 Create a file named Config.props, there are templates to refer to.
#cp/opt/orabbix/conf/config.props.sample Config.props
Here is one of my configurations:
Note that databaselist is case sensitive and is consistent with the hostname above Zabbix.
[root@iz23snm97y9z orabbix]# Cat Conf/config.props
#comma separed List of Zabbix servers
Zabbixserverlist=zabbixserver1
zabbixserver1.address=127.0.0.1
zabbixserver1.port=10051
#ZabbixServer2. Address=ip_address_of_zabbix_server
#ZabbixServer2. Port=port_of_zabbix_server
#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=100
#put here your databases in a comma separated list
Databaselist=db68
#Configuration Connection Pool
#if not specified Orabbis are going to use default values (hardcoded)
#Maximum number of active connection inside pool
databaselist.maxactive=10
#The maximum number of milliseconds that the pool would 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
#define here your connection string for each database
DB68. Url=jdbc:oracle:thin:@10.168.xx.xx:1521:test
DB68. User=zabbix
DB68. Password=zabbix
#Those values are optionals if not specified Orabbix are going to use the general values
DB68. maxactive=10
DB68. maxwait=100
DB68. Maxidle=1
DB68. Querylistfile=./conf/query.props
#DB2. Url=jdbc:oracle:thin: @server2 .domain.example.com:<listener_port>:D B2
#DB2. User=zabbix
#DB2. Password=zabbix_password
#DB2. Querylistfile=./conf/query.props
#
#DB3. Url=jdbc:oracle:thin: @server3 .domain.example.com:<listener_port>:D B3
#DB3. User=zabbix
#DB3. Password=zabbix_password
#DB3. Querylistfile=./conf/query.props
#
#
4 Add permissions above the Oracle database:
CREATE USER ZABBIX
Identified by Zabbix
DEFAULT tablespace SYSTEM
Temporary tablespace TEMP
Profile DEFAULT
Account UNLOCK;
–2 Roles for ZABBIX
GRANT CONNECT to ZABBIX;
GRANT RESOURCE to ZABBIX;
ALTER USER ZABBIX DEFAULT role all;
–5 System Privileges for ZABBIX
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;
```
11g, execute the stored procedure.
```
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
Use the following statement to test:
Select Utl_inaddr.get_host_name (' 127.0.0.1 ') from dual;
5 Join the boot from start:
Chkconfig--add Orabbix
1
6 Start Orabbix
/etc/init.d/orabbix start
1
Observe Logs/orabbix.log
The following output indicates that Orabbix is functioning correctly:
2015-05-08 10:57:44,343 [pool-1-thread-1] INFO orabbix-done with Dbjob on da
Tabase DB68 querylist Elapsed time 1125 ms
1
2
Otherwise, you should look at the specific error information, the general may be permissions are not connected to the database.
Orabbix is a Java program that connects Oracle, so you need to install the Java environment.
7 Zabbix templates for importing XML above
Under the template directory has orabbix_export_full.xml, import him ok.
8 Zabbix Add Host
Note here that you don't need to add Linux templates, just add the Oracle template just imported.
9 End
Now that Oracle has been added, you can see Oracle's running status in a Zabbix diagram. The picture's not cut.