<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.smartmarmot.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Admin</id>
		<title>SmartMarmot - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.smartmarmot.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Admin"/>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Special:Contributions/Admin"/>
		<updated>2026-09-11T14:59:16Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.0-rc.0</generator>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=205</id>
		<title>Orabbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=205"/>
				<updated>2025-10-14T09:55:30Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: Reverted edits by Admin (talk) to last revision by Jason&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;ORABBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;About Orabbix&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
===Product Description===&lt;br /&gt;
Orabbix is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for Oracle Databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous Oracle instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Fig. 1 - Orabbix Architecture&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what Orabbix is capable of monitoring:&lt;br /&gt;
●	DB Version (i.e. Validity of package)&amp;lt;br&amp;gt;&lt;br /&gt;
●	Archiving (Archive log production with trend analysis)&amp;lt;br&amp;gt;&lt;br /&gt;
●	Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages, Control file I/O, Log Write)&lt;br /&gt;
●	Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
●	Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
●	Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
●	PGA&lt;br /&gt;
●	SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
●	Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
●	Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
●	Sessions / Processes&lt;br /&gt;
●	Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
●	DBSize/DBFileSize (DBSize size of database really used space and of Filesize)&lt;br /&gt;
 &lt;br /&gt;
Fig. 1 – Archivelog	 &lt;br /&gt;
Fig. 2 - DBSize and DBFileSize&lt;br /&gt;
Fig. 3 - Events Waits&lt;br /&gt;
Fig. 4 – SGA&lt;br /&gt;
Fig. 5 - Hit Ratio	 &lt;br /&gt;
Fig. 6 – Sessions&lt;br /&gt;
Fig. 7 - Shared Pool&lt;br /&gt;
Fig. 3 - Pin Hit Ratio&lt;br /&gt;
Fig. 9 - Sessions Processes&lt;br /&gt;
Fig. 10 – PGA&lt;br /&gt;
Fig. 11 - Logical I/O&lt;br /&gt;
&lt;br /&gt;
==Orabbix Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
You can read about the history and evolution of the Orabbix plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
You can find the latest versions of Orabbix at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use Orabbix, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested Oracle host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an Oracle client of any kind for Orabbix to work.&lt;br /&gt;
  Orabbix uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require an Oracle client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x Oracle Server. If you are planning on monitoring an Oracle instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring Orabbix to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download Orabbix to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip Orabbix to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for Orabbix to access your Oracle Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’, is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or Oracle instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your Orabbix setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and Oracle.&lt;br /&gt;
&lt;br /&gt;
===config.props===&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
   #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
Orabbix can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating Orabbix data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
====OrabbixDaemon====&lt;br /&gt;
Entries under this tag allow you to set your Orabbix Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
#MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the Orabbix Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by Orabbix, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
#pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
** NOTE: Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  TIP: With the features of the Orabbix Daemon, it is possible to clone Orabbix and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;** Note: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
#Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, Orabbix  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
#Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
#The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
TIP:	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
DB1.MaxActive=10&lt;br /&gt;
DB1.MaxWait=100&lt;br /&gt;
DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Database Connection Parameters====&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
#define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.User=zabbix&lt;br /&gt;
EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
TIP:	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
EXAMPLE2.User=zabbix&lt;br /&gt;
EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
EXAMPLE3.User=zabbix&lt;br /&gt;
EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
** Note: 	After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Query List File====&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the Oracle (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
&amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
TIP: This is really useful to use different query file for different databases or to have a pool of query file one for each Oracle Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
===query.props===&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through Orabbix against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
** Note: Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
#QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
#Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for Orabbix to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want Orabbix to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
TIP:	In the example above, Orabbix would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
TIP:You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 )&lt;br /&gt;
from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE&lt;br /&gt;
FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A,&lt;br /&gt;
( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
archive.RaceConditionQuery=select value&lt;br /&gt;
from&lt;br /&gt;
v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
TIP:	In the example above, Orabbix would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
&amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
&amp;lt; QueryName &amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
&amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
&amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
&amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
&amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to Use Orabbix/FAQ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The Orabbix daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.Orabbix.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
  TIP:From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
  For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “OrabbixDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
==LICENCE Information==&lt;br /&gt;
&lt;br /&gt;
Orabbix is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Main_Page&amp;diff=204</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Main_Page&amp;diff=204"/>
				<updated>2025-10-14T09:55:00Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: Reverted edits by Admin (talk) to last revision by MediaWiki default&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;MediaWiki has been successfully installed.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=203</id>
		<title>DBforBIX</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=203"/>
				<updated>2017-08-10T14:22:00Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.6 you can run DbforBIX.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DBforBIX.&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
* DBforBIX distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.0&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
* db2jcc_license_cu.jar (DB2)&lt;br /&gt;
* db2jcc.jar (DB2)&lt;br /&gt;
* ojdbc6.jar (Oracle)&lt;br /&gt;
* jconn4d.jar (Sybase Anywhere)&lt;br /&gt;
* mbfjdbc2.jar (HP Allbase)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Common Part&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
Install the JAVA JVM &amp;gt;= 1.7 (both Oracle and OpenJDK works properly)&lt;br /&gt;
&lt;br /&gt;
Install JSVC (Java daemon launcher)&lt;br /&gt;
&lt;br /&gt;
Copy config.properties.sample to config.properties and change it adding your databases.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Initd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now for all the distribution that are still using initd use the following procedure:&lt;br /&gt;
&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If your distribution uses systemd, like most of the nowadays here are the steps:&lt;br /&gt;
&lt;br /&gt;
Copy the systemd included files&lt;br /&gt;
&lt;br /&gt;
  cp systemd/dbforbix.service /etc/systemd/system/dbforbix.service&lt;br /&gt;
&lt;br /&gt;
Notify systemd that a new dbforbix.service file exists by executing the following command as root:&lt;br /&gt;
&lt;br /&gt;
  systemctl daemon-reload&lt;br /&gt;
  systemctl start dbforbix.service&lt;br /&gt;
&lt;br /&gt;
To configure the service to start at each boot run (from root console):&lt;br /&gt;
&lt;br /&gt;
  systemctl enable name.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like to test dbforbix from command line you can simply type:&lt;br /&gt;
&lt;br /&gt;
  java -jar dbforbix.jar -a start -C /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
* Install a JRE &amp;gt;= 1.7 on the system&lt;br /&gt;
* Copy config.properties.sample to config.properties and modify&lt;br /&gt;
* Run install.cmd contained with the distribution&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixctl.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixctl.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   -- removed as it is too permissive GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
  ZabbixServerList&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
DBforBIX can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
  ZabbixServerList=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  ZabbixServer1.Address=192.168.0.1&lt;br /&gt;
  ZabbixServer1.Port=10051&lt;br /&gt;
  ZabbixServer2.Address=192.168.0.2&lt;br /&gt;
  ZabbixServer2.Port=10051&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIXDaemon&lt;br /&gt;
Entries under this tag allow you to set your DBforBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
 #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the DBforBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by DB, now this parameter&lt;br /&gt;
&lt;br /&gt;
if not set is automatically calculated.&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
  DBforBIX.MaxThreadNumber=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/dbforbix/logs&lt;br /&gt;
  DBforBIX.PidFile=./logs/dbforbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  DatabaseList&lt;br /&gt;
Entries under this heading allow you to configure your database list information:&lt;br /&gt;
  #put here your databases in a comma separated list&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
  DatabaseList=EXAMPLE1,...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The names of the instances must match those you have specified as your HOST name in Zabbix&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, DBforBIX will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxWait=100&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information .&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.Url=write here your database Url should be in the form:&lt;br /&gt;
  Oracle	=	jdbc:oracle:thin:@&amp;lt;host&amp;gt;:&amp;lt;LISTENER_PORT&amp;gt;:&amp;lt;instance&amp;gt;&lt;br /&gt;
  PostgreSQL	=	jdbc:postgresql://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt;&lt;br /&gt;
  MS Sql Server	=	jdbc:jtds:sqlserver://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;instancename&amp;gt;&lt;br /&gt;
  MySQL Server	=	jdbc:mysql://[host:port],[host:port].../[database]&lt;br /&gt;
  DB2		=	jdbc:db2://&amp;lt;servername&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;installation&amp;gt;&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
  EXAMPLE1.DatabaseType=&amp;lt;databasetype&amp;gt;&lt;br /&gt;
where &amp;lt;databasetype&amp;gt; can be = [oracle]|[pgsql]|[mssql]|[mysql]|[db2]&lt;br /&gt;
it depend from your database&lt;br /&gt;
  EXAMPLE1.QueryListFile=&amp;lt;path to query file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Query List File&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the databases specific queries (SQL) queries can be found. This is a customizable file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to specify the query parameter file:&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props &lt;br /&gt;
This entry will specify the query file of a database relative path are allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most common query files are included in DBforBIX distribution you need to rename and remove “.sample”&lt;br /&gt;
&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customized queries through DBforBIX against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Item names must be unique. The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
  #QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  #Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the&lt;br /&gt;
QueryList, followed by &amp;#039;.Query&amp;#039; for DBforBIX to recognise that this is the query string.&lt;br /&gt;
It’s important to remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
Now you can define what you want DBforBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
Next you can specify a query that will be executed and if return ‘RaceConditionValue’ the query ‘customQueryItemName’ is executed, otherwise it is skipped&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] &lt;br /&gt;
if true query is executed otherwise skipped&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
    FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
    ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes \&lt;br /&gt;
  FROM v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true then add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=202</id>
		<title>DBforBIX2</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=202"/>
				<updated>2016-11-10T15:50:12Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* DBforBIX FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.7 or a JRE 1.8 you can run DbforBIX2.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original Orabbix here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest Orabbix here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
Original DBforBIX here: https://www.zabbix.com/forum/showthread.php?t=21730&amp;amp;highlight=dbforbix &amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX2 was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX2 can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
* https://github.com/smartmarmot/DBforBIX/tree/master/dist&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/ (obsolete since the project has been moved on github but still updated)&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* JSVC Apache framework to make it run as Daemon on Linux or Windows&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX2 automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server or later, Zabbix 3.x is fully supported&lt;br /&gt;
* Java Runtime Environment 7 or later&lt;br /&gt;
* DBforBIX2 distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X 6.X 7.X (CentOS 5.X 6.X &amp;amp;7.X)&lt;br /&gt;
* Windows 2003-2008-1012 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
* 12c&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.X&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2010&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
* db2jcc_license_cu.jar (DB2)&lt;br /&gt;
* db2jcc.jar (DB2)&lt;br /&gt;
* ojdbc6.jar (Oracle)&lt;br /&gt;
* jconn4d.jar (Sybase Anywhere)&lt;br /&gt;
* mbfjdbc2.jar (HP Allbase)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Common Part&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
Install the JAVA JVM &amp;gt;= 1.7 (both Oracle and OpenJDK works properly)&lt;br /&gt;
&lt;br /&gt;
Install JSVC (Java daemon launcher)&lt;br /&gt;
&lt;br /&gt;
Copy config.properties.sample to config.properties and change it adding your databases.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Initd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now for all the distribution that are still using initd use the following procedure:&lt;br /&gt;
&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If your distribution uses systemd, like most of the nowadays here are the steps:&lt;br /&gt;
&lt;br /&gt;
Copy the systemd included files&lt;br /&gt;
&lt;br /&gt;
  cp systemd/dbforbix.service /etc/systemd/system/dbforbix.service&lt;br /&gt;
&lt;br /&gt;
Notify systemd that a new dbforbix.service file exists by executing the following command as root:&lt;br /&gt;
&lt;br /&gt;
  systemctl daemon-reload&lt;br /&gt;
  systemctl start dbforbix.service&lt;br /&gt;
&lt;br /&gt;
To configure the service to start at each boot run (from root console):&lt;br /&gt;
&lt;br /&gt;
  systemctl enable name.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like to test dbforbix from command line you can simply type:&lt;br /&gt;
&lt;br /&gt;
  java -jar dbforbix.jar -a start -C /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
* Install a JRE &amp;gt;= 1.7 on the system&lt;br /&gt;
* Copy config.properties.sample to config.properties and modify&lt;br /&gt;
* Run install.cmd contained with the distribution&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixctl.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixctl.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
First of all let&amp;#039;s start with the general settings ad so the LogLevel:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here you nneed to specify the Log level, the possible values are: [All|Debug|Info|Warning|Error]&lt;br /&gt;
DBforBix.LogLevel=Info&lt;br /&gt;
&lt;br /&gt;
Here you specify the logfilesize (used by the log4J rolling appender) the relative location.&lt;br /&gt;
DBforBix.LogFileSize=1MB&lt;br /&gt;
DBforBix.LogFile=./logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The section that follows is dedicated to the connection pool configuration.&lt;br /&gt;
Then you need to Maximum number of active connection inside pool&lt;br /&gt;
Pool.MaxActive=10&lt;br /&gt;
The pool timeout (the value is expressed in seconds)&lt;br /&gt;
Pool.TimeOut=15&lt;br /&gt;
&lt;br /&gt;
Then you find the section that defines the ZabbixServer you want to send the item to:&lt;br /&gt;
&lt;br /&gt;
ZabbixServer.1.Address=&amp;lt;ip address of your Zabbix server&amp;gt;&lt;br /&gt;
ZabbixServer.1.Port=&amp;lt;port used by your Zabbix server, usually 10051&amp;gt;&lt;br /&gt;
Here to add one more ZabbixServer you should write the following parameters:&lt;br /&gt;
ZabbixServer.2.Address=&amp;lt;ip address of the second Zabbix server&amp;gt;&lt;br /&gt;
ZabbixServer.2.Port=&amp;lt;port used by the second Zabbix server&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
or on systemctl &lt;br /&gt;
  systemctl start dbforbix.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
or on systemctl &lt;br /&gt;
  systemctl stop dbforbix.service&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfills the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
&lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=201</id>
		<title>DBforBIX2</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=201"/>
				<updated>2016-11-10T15:48:08Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Configuration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.7 or a JRE 1.8 you can run DbforBIX2.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original Orabbix here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest Orabbix here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
Original DBforBIX here: https://www.zabbix.com/forum/showthread.php?t=21730&amp;amp;highlight=dbforbix &amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX2 was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX2 can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
* https://github.com/smartmarmot/DBforBIX/tree/master/dist&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/ (obsolete since the project has been moved on github but still updated)&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* JSVC Apache framework to make it run as Daemon on Linux or Windows&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX2 automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server or later, Zabbix 3.x is fully supported&lt;br /&gt;
* Java Runtime Environment 7 or later&lt;br /&gt;
* DBforBIX2 distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X 6.X 7.X (CentOS 5.X 6.X &amp;amp;7.X)&lt;br /&gt;
* Windows 2003-2008-1012 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
* 12c&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.X&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2010&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
* db2jcc_license_cu.jar (DB2)&lt;br /&gt;
* db2jcc.jar (DB2)&lt;br /&gt;
* ojdbc6.jar (Oracle)&lt;br /&gt;
* jconn4d.jar (Sybase Anywhere)&lt;br /&gt;
* mbfjdbc2.jar (HP Allbase)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Common Part&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
Install the JAVA JVM &amp;gt;= 1.7 (both Oracle and OpenJDK works properly)&lt;br /&gt;
&lt;br /&gt;
Install JSVC (Java daemon launcher)&lt;br /&gt;
&lt;br /&gt;
Copy config.properties.sample to config.properties and change it adding your databases.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Initd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now for all the distribution that are still using initd use the following procedure:&lt;br /&gt;
&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If your distribution uses systemd, like most of the nowadays here are the steps:&lt;br /&gt;
&lt;br /&gt;
Copy the systemd included files&lt;br /&gt;
&lt;br /&gt;
  cp systemd/dbforbix.service /etc/systemd/system/dbforbix.service&lt;br /&gt;
&lt;br /&gt;
Notify systemd that a new dbforbix.service file exists by executing the following command as root:&lt;br /&gt;
&lt;br /&gt;
  systemctl daemon-reload&lt;br /&gt;
  systemctl start dbforbix.service&lt;br /&gt;
&lt;br /&gt;
To configure the service to start at each boot run (from root console):&lt;br /&gt;
&lt;br /&gt;
  systemctl enable name.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like to test dbforbix from command line you can simply type:&lt;br /&gt;
&lt;br /&gt;
  java -jar dbforbix.jar -a start -C /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
* Install a JRE &amp;gt;= 1.7 on the system&lt;br /&gt;
* Copy config.properties.sample to config.properties and modify&lt;br /&gt;
* Run install.cmd contained with the distribution&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixctl.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixctl.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
First of all let&amp;#039;s start with the general settings ad so the LogLevel:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here you nneed to specify the Log level, the possible values are: [All|Debug|Info|Warning|Error]&lt;br /&gt;
DBforBix.LogLevel=Info&lt;br /&gt;
&lt;br /&gt;
Here you specify the logfilesize (used by the log4J rolling appender) the relative location.&lt;br /&gt;
DBforBix.LogFileSize=1MB&lt;br /&gt;
DBforBix.LogFile=./logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The section that follows is dedicated to the connection pool configuration.&lt;br /&gt;
Then you need to Maximum number of active connection inside pool&lt;br /&gt;
Pool.MaxActive=10&lt;br /&gt;
The pool timeout (the value is expressed in seconds)&lt;br /&gt;
Pool.TimeOut=15&lt;br /&gt;
&lt;br /&gt;
Then you find the section that defines the ZabbixServer you want to send the item to:&lt;br /&gt;
&lt;br /&gt;
ZabbixServer.1.Address=&amp;lt;ip address of your Zabbix server&amp;gt;&lt;br /&gt;
ZabbixServer.1.Port=&amp;lt;port used by your Zabbix server, usually 10051&amp;gt;&lt;br /&gt;
Here to add one more ZabbixServer you should write the following parameters:&lt;br /&gt;
ZabbixServer.2.Address=&amp;lt;ip address of the second Zabbix server&amp;gt;&lt;br /&gt;
ZabbixServer.2.Port=&amp;lt;port used by the second Zabbix server&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=200</id>
		<title>DBforBIX2</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=200"/>
				<updated>2016-11-10T15:47:34Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Config.props */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.7 or a JRE 1.8 you can run DbforBIX2.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original Orabbix here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest Orabbix here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
Original DBforBIX here: https://www.zabbix.com/forum/showthread.php?t=21730&amp;amp;highlight=dbforbix &amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX2 was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX2 can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
* https://github.com/smartmarmot/DBforBIX/tree/master/dist&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/ (obsolete since the project has been moved on github but still updated)&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* JSVC Apache framework to make it run as Daemon on Linux or Windows&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX2 automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server or later, Zabbix 3.x is fully supported&lt;br /&gt;
* Java Runtime Environment 7 or later&lt;br /&gt;
* DBforBIX2 distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X 6.X 7.X (CentOS 5.X 6.X &amp;amp;7.X)&lt;br /&gt;
* Windows 2003-2008-1012 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
* 12c&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.X&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2010&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
* db2jcc_license_cu.jar (DB2)&lt;br /&gt;
* db2jcc.jar (DB2)&lt;br /&gt;
* ojdbc6.jar (Oracle)&lt;br /&gt;
* jconn4d.jar (Sybase Anywhere)&lt;br /&gt;
* mbfjdbc2.jar (HP Allbase)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Common Part&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
Install the JAVA JVM &amp;gt;= 1.7 (both Oracle and OpenJDK works properly)&lt;br /&gt;
&lt;br /&gt;
Install JSVC (Java daemon launcher)&lt;br /&gt;
&lt;br /&gt;
Copy config.properties.sample to config.properties and change it adding your databases.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Initd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now for all the distribution that are still using initd use the following procedure:&lt;br /&gt;
&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If your distribution uses systemd, like most of the nowadays here are the steps:&lt;br /&gt;
&lt;br /&gt;
Copy the systemd included files&lt;br /&gt;
&lt;br /&gt;
  cp systemd/dbforbix.service /etc/systemd/system/dbforbix.service&lt;br /&gt;
&lt;br /&gt;
Notify systemd that a new dbforbix.service file exists by executing the following command as root:&lt;br /&gt;
&lt;br /&gt;
  systemctl daemon-reload&lt;br /&gt;
  systemctl start dbforbix.service&lt;br /&gt;
&lt;br /&gt;
To configure the service to start at each boot run (from root console):&lt;br /&gt;
&lt;br /&gt;
  systemctl enable name.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like to test dbforbix from command line you can simply type:&lt;br /&gt;
&lt;br /&gt;
  java -jar dbforbix.jar -a start -C /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
* Install a JRE &amp;gt;= 1.7 on the system&lt;br /&gt;
* Copy config.properties.sample to config.properties and modify&lt;br /&gt;
* Run install.cmd contained with the distribution&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixctl.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixctl.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
First of all let&amp;#039;s start with the general settings ad so the LogLevel:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here you nneed to specify the Log level, the possible values are: [All|Debug|Info|Warning|Error]&lt;br /&gt;
DBforBix.LogLevel=Info&lt;br /&gt;
&lt;br /&gt;
Here you specify the logfilesize (used by the log4J rolling appender) the relative location.&lt;br /&gt;
DBforBix.LogFileSize=1MB&lt;br /&gt;
DBforBix.LogFile=./logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The section that follows is dedicated to the connection pool configuration.&lt;br /&gt;
Then you need to Maximum number of active connection inside pool&lt;br /&gt;
Pool.MaxActive=10&lt;br /&gt;
The pool timeout (the value is expressed in seconds)&lt;br /&gt;
Pool.TimeOut=15&lt;br /&gt;
&lt;br /&gt;
Then you find the section that defines the ZabbixServer you want to send the item to:&lt;br /&gt;
&lt;br /&gt;
ZabbixServer.1.Address=&amp;lt;ip address of your Zabbix server&amp;gt;&lt;br /&gt;
ZabbixServer.1.Port=&amp;lt;port used by your Zabbix server, usually 10051&amp;gt;&lt;br /&gt;
Here to add one more ZabbixServer you should write the following parameters:&lt;br /&gt;
ZabbixServer.2.Address=&amp;lt;ip address of the second Zabbix server&amp;gt;&lt;br /&gt;
ZabbixServer.2.Port=&amp;lt;port used by the second Zabbix server&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  DatabaseList&lt;br /&gt;
Entries under this heading allow you to configure your database list information:&lt;br /&gt;
  #put here your databases in a comma separated list&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
  DatabaseList=EXAMPLE1,...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The names of the instances must match those you have specified as your HOST name in Zabbix&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Database configuration section&lt;br /&gt;
&lt;br /&gt;
Each database needs to be defined by a group with the following settings. The &amp;lt;DATABASE&amp;gt; in the following parameters should be replaced by a server name or any string you like even a number.&lt;br /&gt;
&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.Type&lt;br /&gt;
The database type of this entry.&lt;br /&gt;
Possible values: DB2, ORACLE, MSSQL, MYSQL, PGSQL, ALLBASE, SYBASE, SQLANY;&lt;br /&gt;
&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.Name&lt;br /&gt;
The name of the database in your zabbix screens. This value must match this name or no values will be visible.&lt;br /&gt;
Possible values: a possible zabbix host name&lt;br /&gt;
&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.Instance=&amp;lt;INSTANCE NAME&amp;gt;&lt;br /&gt;
An optional instance parameter. This parameter is used to replace %INSTANCE% parameters in item queries.&lt;br /&gt;
Possible values: a possible identifier&lt;br /&gt;
&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.Url=&amp;lt;VALID JBDC URL&amp;gt;&lt;br /&gt;
The JDBC url of the database connection.&lt;br /&gt;
Possible values: a valid JDBC URL&lt;br /&gt;
&lt;br /&gt;
The database username is indicated here:&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.User=&amp;lt;USERNAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The password of the user.&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.Password&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information .&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.Url=write here your database Url should be in the form:&lt;br /&gt;
  Oracle	=	jdbc:oracle:thin:@&amp;lt;host&amp;gt;:&amp;lt;LISTENER_PORT&amp;gt;:&amp;lt;instance&amp;gt;&lt;br /&gt;
  PostgreSQL	=	jdbc:postgresql://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt;&lt;br /&gt;
  MS Sql Server	=	jdbc:jtds:sqlserver://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;instancename&amp;gt;&lt;br /&gt;
  MySQL Server	=	jdbc:mysql://[host:port],[host:port].../[database]&lt;br /&gt;
  DB2		=	jdbc:db2://&amp;lt;servername&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;installation&amp;gt;&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
  EXAMPLE1.DatabaseType=&amp;lt;databasetype&amp;gt;&lt;br /&gt;
where &amp;lt;databasetype&amp;gt; can be = [oracle]|[pgsql]|[mssql]|[mysql]|[db2]&lt;br /&gt;
it depend from your database&lt;br /&gt;
  EXAMPLE1.QueryListFile=&amp;lt;path to query file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Query List File&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the databases specific queries (SQL) queries can be found. This is a customizable file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to specify the query parameter file:&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props &lt;br /&gt;
This entry will specify the query file of a database relative path are allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most common query files are included in DBforBIX distribution you need to rename and remove “.sample”&lt;br /&gt;
&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customized queries through DBforBIX against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Item names must be unique. The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
  #QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  #Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the&lt;br /&gt;
QueryList, followed by &amp;#039;.Query&amp;#039; for DBforBIX to recognise that this is the query string.&lt;br /&gt;
It’s important to remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
Now you can define what you want DBforBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
Next you can specify a query that will be executed and if return ‘RaceConditionValue’ the query ‘customQueryItemName’ is executed, otherwise it is skipped&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] &lt;br /&gt;
if true query is executed otherwise skipped&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
    FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
    ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes \&lt;br /&gt;
  FROM v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true then add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=199</id>
		<title>DBforBIX2</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=199"/>
				<updated>2016-11-06T11:21:32Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.7 or a JRE 1.8 you can run DbforBIX2.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original Orabbix here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest Orabbix here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
Original DBforBIX here: https://www.zabbix.com/forum/showthread.php?t=21730&amp;amp;highlight=dbforbix &amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX2 was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX2 can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
* https://github.com/smartmarmot/DBforBIX/tree/master/dist&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/ (obsolete since the project has been moved on github but still updated)&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* JSVC Apache framework to make it run as Daemon on Linux or Windows&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX2 automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server or later, Zabbix 3.x is fully supported&lt;br /&gt;
* Java Runtime Environment 7 or later&lt;br /&gt;
* DBforBIX2 distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X 6.X 7.X (CentOS 5.X 6.X &amp;amp;7.X)&lt;br /&gt;
* Windows 2003-2008-1012 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
* 12c&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.X&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2010&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
* db2jcc_license_cu.jar (DB2)&lt;br /&gt;
* db2jcc.jar (DB2)&lt;br /&gt;
* ojdbc6.jar (Oracle)&lt;br /&gt;
* jconn4d.jar (Sybase Anywhere)&lt;br /&gt;
* mbfjdbc2.jar (HP Allbase)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Common Part&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
Install the JAVA JVM &amp;gt;= 1.7 (both Oracle and OpenJDK works properly)&lt;br /&gt;
&lt;br /&gt;
Install JSVC (Java daemon launcher)&lt;br /&gt;
&lt;br /&gt;
Copy config.properties.sample to config.properties and change it adding your databases.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Initd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now for all the distribution that are still using initd use the following procedure:&lt;br /&gt;
&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If your distribution uses systemd, like most of the nowadays here are the steps:&lt;br /&gt;
&lt;br /&gt;
Copy the systemd included files&lt;br /&gt;
&lt;br /&gt;
  cp systemd/dbforbix.service /etc/systemd/system/dbforbix.service&lt;br /&gt;
&lt;br /&gt;
Notify systemd that a new dbforbix.service file exists by executing the following command as root:&lt;br /&gt;
&lt;br /&gt;
  systemctl daemon-reload&lt;br /&gt;
  systemctl start dbforbix.service&lt;br /&gt;
&lt;br /&gt;
To configure the service to start at each boot run (from root console):&lt;br /&gt;
&lt;br /&gt;
  systemctl enable name.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like to test dbforbix from command line you can simply type:&lt;br /&gt;
&lt;br /&gt;
  java -jar dbforbix.jar -a start -C /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
* Install a JRE &amp;gt;= 1.7 on the system&lt;br /&gt;
* Copy config.properties.sample to config.properties and modify&lt;br /&gt;
* Run install.cmd contained with the distribution&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixctl.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixctl.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
First of all let&amp;#039;s start with the general settings ad so the LogLevel:&lt;br /&gt;
&lt;br /&gt;
### General settings ###&lt;br /&gt;
# Log level (All|Debug|Info|Warning|Error)&lt;br /&gt;
DBforBix.LogLevel=Info&lt;br /&gt;
&lt;br /&gt;
The LogFile and the relative location.&lt;br /&gt;
# Log file name&lt;br /&gt;
DBforBix.LogFile=./logs/dbforbix.log&lt;br /&gt;
# Maximum log file size&lt;br /&gt;
DBforBix.LogFileSize=1MB&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The section that follows is dedicated to the connection pool configuration.&lt;br /&gt;
### Configuration of Connection pool ###&lt;br /&gt;
# Maximum number of active connection inside pool&lt;br /&gt;
Pool.MaxActive=10&lt;br /&gt;
# Login Timout&lt;br /&gt;
Pool.TimeOut=15&lt;br /&gt;
&lt;br /&gt;
Then you find the section that defines the ZabbixServer you want to send the item to:&lt;br /&gt;
### Zabbix servers ###&lt;br /&gt;
# A list of Zabbix servers, increase the number to add more&lt;br /&gt;
ZabbixServer.1.Address=&amp;lt;ip address of your Zabbix server&amp;gt;&lt;br /&gt;
ZabbixServer.1.Port=&amp;lt;port used by your Zabbix server, usually 10051&amp;gt;&lt;br /&gt;
Here to add one more ZabbixServer you should write the following parameters:&lt;br /&gt;
ZabbixServer.2.Address=&amp;lt;ip address of the second Zabbix server&amp;gt;&lt;br /&gt;
ZabbixServer.2.Port=&amp;lt;port used by the second Zabbix server&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  DatabaseList&lt;br /&gt;
Entries under this heading allow you to configure your database list information:&lt;br /&gt;
  #put here your databases in a comma separated list&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
  DatabaseList=EXAMPLE1,...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The names of the instances must match those you have specified as your HOST name in Zabbix&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Database configuration section&lt;br /&gt;
&lt;br /&gt;
Each database needs to be defined by a group with the following settings. The &amp;lt;DATABASE&amp;gt; in the following parameters should be replaced by a server name or any string you like even a number.&lt;br /&gt;
&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.Type&lt;br /&gt;
The database type of this entry.&lt;br /&gt;
Possible values: DB2, ORACLE, MSSQL, MYSQL, PGSQL, ALLBASE, SYBASE, SQLANY;&lt;br /&gt;
&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.Name&lt;br /&gt;
The name of the database in your zabbix screens. This value must match this name or no values will be visible.&lt;br /&gt;
Possible values: a possible zabbix host name&lt;br /&gt;
&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.Instance=&amp;lt;INSTANCE NAME&amp;gt;&lt;br /&gt;
An optional instance parameter. This parameter is used to replace %INSTANCE% parameters in item queries.&lt;br /&gt;
Possible values: a possible identifier&lt;br /&gt;
&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.Url=&amp;lt;VALID JBDC URL&amp;gt;&lt;br /&gt;
The JDBC url of the database connection.&lt;br /&gt;
Possible values: a valid JDBC URL&lt;br /&gt;
&lt;br /&gt;
The database username is indicated here:&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.User=&amp;lt;USERNAME&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The password of the user.&lt;br /&gt;
DB.&amp;lt;DATABASE&amp;gt;.Password&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information .&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.Url=write here your database Url should be in the form:&lt;br /&gt;
  Oracle	=	jdbc:oracle:thin:@&amp;lt;host&amp;gt;:&amp;lt;LISTENER_PORT&amp;gt;:&amp;lt;instance&amp;gt;&lt;br /&gt;
  PostgreSQL	=	jdbc:postgresql://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt;&lt;br /&gt;
  MS Sql Server	=	jdbc:jtds:sqlserver://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;instancename&amp;gt;&lt;br /&gt;
  MySQL Server	=	jdbc:mysql://[host:port],[host:port].../[database]&lt;br /&gt;
  DB2		=	jdbc:db2://&amp;lt;servername&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;installation&amp;gt;&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
  EXAMPLE1.DatabaseType=&amp;lt;databasetype&amp;gt;&lt;br /&gt;
where &amp;lt;databasetype&amp;gt; can be = [oracle]|[pgsql]|[mssql]|[mysql]|[db2]&lt;br /&gt;
it depend from your database&lt;br /&gt;
  EXAMPLE1.QueryListFile=&amp;lt;path to query file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Query List File&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the databases specific queries (SQL) queries can be found. This is a customizable file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to specify the query parameter file:&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props &lt;br /&gt;
This entry will specify the query file of a database relative path are allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most common query files are included in DBforBIX distribution you need to rename and remove “.sample”&lt;br /&gt;
&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customized queries through DBforBIX against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Item names must be unique. The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
  #QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  #Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the&lt;br /&gt;
QueryList, followed by &amp;#039;.Query&amp;#039; for DBforBIX to recognise that this is the query string.&lt;br /&gt;
It’s important to remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
Now you can define what you want DBforBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
Next you can specify a query that will be executed and if return ‘RaceConditionValue’ the query ‘customQueryItemName’ is executed, otherwise it is skipped&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] &lt;br /&gt;
if true query is executed otherwise skipped&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
    FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
    ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes \&lt;br /&gt;
  FROM v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true then add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=198</id>
		<title>DBforBIX2</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=198"/>
				<updated>2016-11-06T09:14:45Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.7 or a JRE 1.8 you can run DbforBIX2.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original Orabbix here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest Orabbix here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
Original DBforBIX here: https://www.zabbix.com/forum/showthread.php?t=21730&amp;amp;highlight=dbforbix &amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX2 was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX2 can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
* https://github.com/smartmarmot/DBforBIX/tree/master/dist&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/ (obsolete since the project has been moved on github but still updated)&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* JSVC Apache framework to make it run as Daemon on Linux or Windows&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX2 automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server or later, Zabbix 3.x is fully supported&lt;br /&gt;
* Java Runtime Environment 7 or later&lt;br /&gt;
* DBforBIX2 distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X 6.X 7.X (CentOS 5.X 6.X &amp;amp;7.X)&lt;br /&gt;
* Windows 2003-2008-1012 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
* 12c&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.X&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2010&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
* db2jcc_license_cu.jar (DB2)&lt;br /&gt;
* db2jcc.jar (DB2)&lt;br /&gt;
* ojdbc6.jar (Oracle)&lt;br /&gt;
* jconn4d.jar (Sybase Anywhere)&lt;br /&gt;
* mbfjdbc2.jar (HP Allbase)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Common Part&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
Install the JAVA JVM &amp;gt;= 1.7 (both Oracle and OpenJDK works properly)&lt;br /&gt;
&lt;br /&gt;
Install JSVC (Java daemon launcher)&lt;br /&gt;
&lt;br /&gt;
Copy config.properties.sample to config.properties and change it adding your databases.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Initd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now for all the distribution that are still using initd use the following procedure:&lt;br /&gt;
&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If your distribution uses systemd, like most of the nowadays here are the steps:&lt;br /&gt;
&lt;br /&gt;
Copy the systemd included files&lt;br /&gt;
&lt;br /&gt;
  cp systemd/dbforbix.service /etc/systemd/system/dbforbix.service&lt;br /&gt;
&lt;br /&gt;
Notify systemd that a new dbforbix.service file exists by executing the following command as root:&lt;br /&gt;
&lt;br /&gt;
  systemctl daemon-reload&lt;br /&gt;
  systemctl start dbforbix.service&lt;br /&gt;
&lt;br /&gt;
To configure the service to start at each boot run (from root console):&lt;br /&gt;
&lt;br /&gt;
  systemctl enable name.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like to test dbforbix from command line you can simply type:&lt;br /&gt;
&lt;br /&gt;
  java -jar dbforbix.jar -a start -C /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
* Install a JRE &amp;gt;= 1.7 on the system&lt;br /&gt;
* Copy config.properties.sample to config.properties and modify&lt;br /&gt;
* Run install.cmd contained with the distribution&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixctl.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixctl.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
  ZabbixServerList&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
DBforBIX can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
  ZabbixServerList=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  ZabbixServer1.Address=192.168.0.1&lt;br /&gt;
  ZabbixServer1.Port=10051&lt;br /&gt;
  ZabbixServer2.Address=192.168.0.2&lt;br /&gt;
  ZabbixServer2.Port=10051&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIXDaemon&lt;br /&gt;
Entries under this tag allow you to set your DBforBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
 #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the DBforBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by DB, now this parameter&lt;br /&gt;
&lt;br /&gt;
if not set is automatically calculated.&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
  DBforBIX.MaxThreadNumber=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/dbforbix/logs&lt;br /&gt;
  DBforBIX.PidFile=./logs/dbforbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  DatabaseList&lt;br /&gt;
Entries under this heading allow you to configure your database list information:&lt;br /&gt;
  #put here your databases in a comma separated list&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
  DatabaseList=EXAMPLE1,...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The names of the instances must match those you have specified as your HOST name in Zabbix&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, DBforBIX will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxWait=100&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information .&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.Url=write here your database Url should be in the form:&lt;br /&gt;
  Oracle	=	jdbc:oracle:thin:@&amp;lt;host&amp;gt;:&amp;lt;LISTENER_PORT&amp;gt;:&amp;lt;instance&amp;gt;&lt;br /&gt;
  PostgreSQL	=	jdbc:postgresql://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt;&lt;br /&gt;
  MS Sql Server	=	jdbc:jtds:sqlserver://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;instancename&amp;gt;&lt;br /&gt;
  MySQL Server	=	jdbc:mysql://[host:port],[host:port].../[database]&lt;br /&gt;
  DB2		=	jdbc:db2://&amp;lt;servername&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;installation&amp;gt;&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
  EXAMPLE1.DatabaseType=&amp;lt;databasetype&amp;gt;&lt;br /&gt;
where &amp;lt;databasetype&amp;gt; can be = [oracle]|[pgsql]|[mssql]|[mysql]|[db2]&lt;br /&gt;
it depend from your database&lt;br /&gt;
  EXAMPLE1.QueryListFile=&amp;lt;path to query file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Query List File&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the databases specific queries (SQL) queries can be found. This is a customizable file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to specify the query parameter file:&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props &lt;br /&gt;
This entry will specify the query file of a database relative path are allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most common query files are included in DBforBIX distribution you need to rename and remove “.sample”&lt;br /&gt;
&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customized queries through DBforBIX against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Item names must be unique. The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
  #QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  #Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the&lt;br /&gt;
QueryList, followed by &amp;#039;.Query&amp;#039; for DBforBIX to recognise that this is the query string.&lt;br /&gt;
It’s important to remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
Now you can define what you want DBforBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
Next you can specify a query that will be executed and if return ‘RaceConditionValue’ the query ‘customQueryItemName’ is executed, otherwise it is skipped&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] &lt;br /&gt;
if true query is executed otherwise skipped&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
    FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
    ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes \&lt;br /&gt;
  FROM v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true then add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Main_Page&amp;diff=197</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Main_Page&amp;diff=197"/>
				<updated>2016-11-04T21:42:09Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;SmartMarmot Wiki Pages.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_logo.png|320px|link=Orabbix]] &amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DBforBIX.png|320px|link=DBforBIX]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DBforBIX2.png|320px|link=DBforBIX2]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:postbix_logo.png|320px|link=PostBIX]]&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=196</id>
		<title>DBforBIX2</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX2&amp;diff=196"/>
				<updated>2016-11-04T21:39:13Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: Created page with &amp;quot;==About DBforBix== Fig. 1 - DBforBIX Architecture DBforBIX is a daemon designed to work in combin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.6 you can run DbforBIX.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX2 was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DBforBIX.&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
* DBforBIX distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.0&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
* db2jcc_license_cu.jar (DB2)&lt;br /&gt;
* db2jcc.jar (DB2)&lt;br /&gt;
* ojdbc6.jar (Oracle)&lt;br /&gt;
* jconn4d.jar (Sybase Anywhere)&lt;br /&gt;
* mbfjdbc2.jar (HP Allbase)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Common Part&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
Install the JAVA JVM &amp;gt;= 1.7 (both Oracle and OpenJDK works properly)&lt;br /&gt;
&lt;br /&gt;
Install JSVC (Java daemon launcher)&lt;br /&gt;
&lt;br /&gt;
Copy config.properties.sample to config.properties and change it adding your databases.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Initd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now for all the distribution that are still using initd use the following procedure:&lt;br /&gt;
&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If your distribution uses systemd, like most of the nowadays here are the steps:&lt;br /&gt;
&lt;br /&gt;
Copy the systemd included files&lt;br /&gt;
&lt;br /&gt;
  cp systemd/dbforbix.service /etc/systemd/system/dbforbix.service&lt;br /&gt;
&lt;br /&gt;
Notify systemd that a new dbforbix.service file exists by executing the following command as root:&lt;br /&gt;
&lt;br /&gt;
  systemctl daemon-reload&lt;br /&gt;
  systemctl start dbforbix.service&lt;br /&gt;
&lt;br /&gt;
To configure the service to start at each boot run (from root console):&lt;br /&gt;
&lt;br /&gt;
  systemctl enable name.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like to test dbforbix from command line you can simply type:&lt;br /&gt;
&lt;br /&gt;
  java -jar dbforbix.jar -a start -C /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
* Install a JRE &amp;gt;= 1.7 on the system&lt;br /&gt;
* Copy config.properties.sample to config.properties and modify&lt;br /&gt;
* Run install.cmd contained with the distribution&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixctl.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixctl.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
  ZabbixServerList&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
DBforBIX can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
  ZabbixServerList=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  ZabbixServer1.Address=192.168.0.1&lt;br /&gt;
  ZabbixServer1.Port=10051&lt;br /&gt;
  ZabbixServer2.Address=192.168.0.2&lt;br /&gt;
  ZabbixServer2.Port=10051&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIXDaemon&lt;br /&gt;
Entries under this tag allow you to set your DBforBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
 #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the DBforBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by DB, now this parameter&lt;br /&gt;
&lt;br /&gt;
if not set is automatically calculated.&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
  DBforBIX.MaxThreadNumber=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/dbforbix/logs&lt;br /&gt;
  DBforBIX.PidFile=./logs/dbforbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  DatabaseList&lt;br /&gt;
Entries under this heading allow you to configure your database list information:&lt;br /&gt;
  #put here your databases in a comma separated list&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
  DatabaseList=EXAMPLE1,...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The names of the instances must match those you have specified as your HOST name in Zabbix&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, DBforBIX will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxWait=100&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information .&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.Url=write here your database Url should be in the form:&lt;br /&gt;
  Oracle	=	jdbc:oracle:thin:@&amp;lt;host&amp;gt;:&amp;lt;LISTENER_PORT&amp;gt;:&amp;lt;instance&amp;gt;&lt;br /&gt;
  PostgreSQL	=	jdbc:postgresql://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt;&lt;br /&gt;
  MS Sql Server	=	jdbc:jtds:sqlserver://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;instancename&amp;gt;&lt;br /&gt;
  MySQL Server	=	jdbc:mysql://[host:port],[host:port].../[database]&lt;br /&gt;
  DB2		=	jdbc:db2://&amp;lt;servername&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;installation&amp;gt;&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
  EXAMPLE1.DatabaseType=&amp;lt;databasetype&amp;gt;&lt;br /&gt;
where &amp;lt;databasetype&amp;gt; can be = [oracle]|[pgsql]|[mssql]|[mysql]|[db2]&lt;br /&gt;
it depend from your database&lt;br /&gt;
  EXAMPLE1.QueryListFile=&amp;lt;path to query file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Query List File&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the databases specific queries (SQL) queries can be found. This is a customizable file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to specify the query parameter file:&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props &lt;br /&gt;
This entry will specify the query file of a database relative path are allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most common query files are included in DBforBIX distribution you need to rename and remove “.sample”&lt;br /&gt;
&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customized queries through DBforBIX against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Item names must be unique. The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
  #QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  #Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the&lt;br /&gt;
QueryList, followed by &amp;#039;.Query&amp;#039; for DBforBIX to recognise that this is the query string.&lt;br /&gt;
It’s important to remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
Now you can define what you want DBforBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
Next you can specify a query that will be executed and if return ‘RaceConditionValue’ the query ‘customQueryItemName’ is executed, otherwise it is skipped&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] &lt;br /&gt;
if true query is executed otherwise skipped&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
    FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
    ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes \&lt;br /&gt;
  FROM v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true then add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:DBforBIX2.png&amp;diff=195</id>
		<title>File:DBforBIX2.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:DBforBIX2.png&amp;diff=195"/>
				<updated>2016-11-04T21:37:33Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Main_Page&amp;diff=194</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Main_Page&amp;diff=194"/>
				<updated>2016-11-04T21:37:13Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;SmartMarmot Wiki Pages.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_logo.png|320px|link=Orabbix]] &amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DBforBIX.png|320px|link=DBforBIX]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DBforBIX2.png|320px|link=DBforBIX2]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:postbix_logo.png|320px|link=PostBIX]]&amp;lt;br&amp;gt;&lt;br /&gt;
*[[mysqlbix |MySQLBIX]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=193</id>
		<title>DBforBIX</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=193"/>
				<updated>2016-10-23T08:25:30Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Installation on Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.6 you can run DbforBIX.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DBforBIX.&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
* DBforBIX distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.0&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
* db2jcc_license_cu.jar (DB2)&lt;br /&gt;
* db2jcc.jar (DB2)&lt;br /&gt;
* ojdbc6.jar (Oracle)&lt;br /&gt;
* jconn4d.jar (Sybase Anywhere)&lt;br /&gt;
* mbfjdbc2.jar (HP Allbase)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Common Part&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
Install the JAVA JVM &amp;gt;= 1.7 (both Oracle and OpenJDK works properly)&lt;br /&gt;
&lt;br /&gt;
Install JSVC (Java daemon launcher)&lt;br /&gt;
&lt;br /&gt;
Copy config.properties.sample to config.properties and change it adding your databases.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Initd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now for all the distribution that are still using initd use the following procedure:&lt;br /&gt;
&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If your distribution uses systemd, like most of the nowadays here are the steps:&lt;br /&gt;
&lt;br /&gt;
Copy the systemd included files&lt;br /&gt;
&lt;br /&gt;
  cp systemd/dbforbix.service /etc/systemd/system/dbforbix.service&lt;br /&gt;
&lt;br /&gt;
Notify systemd that a new dbforbix.service file exists by executing the following command as root:&lt;br /&gt;
&lt;br /&gt;
  systemctl daemon-reload&lt;br /&gt;
  systemctl start dbforbix.service&lt;br /&gt;
&lt;br /&gt;
To configure the service to start at each boot run (from root console):&lt;br /&gt;
&lt;br /&gt;
  systemctl enable name.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like to test dbforbix from command line you can simply type:&lt;br /&gt;
&lt;br /&gt;
  java -jar dbforbix.jar -a start -C /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
* Install a JRE &amp;gt;= 1.7 on the system&lt;br /&gt;
* Copy config.properties.sample to config.properties and modify&lt;br /&gt;
* Run install.cmd contained with the distribution&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixctl.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixctl.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
  ZabbixServerList&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
DBforBIX can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
  ZabbixServerList=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  ZabbixServer1.Address=192.168.0.1&lt;br /&gt;
  ZabbixServer1.Port=10051&lt;br /&gt;
  ZabbixServer2.Address=192.168.0.2&lt;br /&gt;
  ZabbixServer2.Port=10051&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIXDaemon&lt;br /&gt;
Entries under this tag allow you to set your DBforBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
 #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the DBforBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by DB, now this parameter&lt;br /&gt;
&lt;br /&gt;
if not set is automatically calculated.&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
  DBforBIX.MaxThreadNumber=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/dbforbix/logs&lt;br /&gt;
  DBforBIX.PidFile=./logs/dbforbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  DatabaseList&lt;br /&gt;
Entries under this heading allow you to configure your database list information:&lt;br /&gt;
  #put here your databases in a comma separated list&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
  DatabaseList=EXAMPLE1,...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The names of the instances must match those you have specified as your HOST name in Zabbix&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, DBforBIX will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxWait=100&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information .&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.Url=write here your database Url should be in the form:&lt;br /&gt;
  Oracle	=	jdbc:oracle:thin:@&amp;lt;host&amp;gt;:&amp;lt;LISTENER_PORT&amp;gt;:&amp;lt;instance&amp;gt;&lt;br /&gt;
  PostgreSQL	=	jdbc:postgresql://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt;&lt;br /&gt;
  MS Sql Server	=	jdbc:jtds:sqlserver://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;instancename&amp;gt;&lt;br /&gt;
  MySQL Server	=	jdbc:mysql://[host:port],[host:port].../[database]&lt;br /&gt;
  DB2		=	jdbc:db2://&amp;lt;servername&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;installation&amp;gt;&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
  EXAMPLE1.DatabaseType=&amp;lt;databasetype&amp;gt;&lt;br /&gt;
where &amp;lt;databasetype&amp;gt; can be = [oracle]|[pgsql]|[mssql]|[mysql]|[db2]&lt;br /&gt;
it depend from your database&lt;br /&gt;
  EXAMPLE1.QueryListFile=&amp;lt;path to query file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Query List File&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the databases specific queries (SQL) queries can be found. This is a customizable file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to specify the query parameter file:&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props &lt;br /&gt;
This entry will specify the query file of a database relative path are allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most common query files are included in DBforBIX distribution you need to rename and remove “.sample”&lt;br /&gt;
&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customized queries through DBforBIX against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Item names must be unique. The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
  #QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  #Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the&lt;br /&gt;
QueryList, followed by &amp;#039;.Query&amp;#039; for DBforBIX to recognise that this is the query string.&lt;br /&gt;
It’s important to remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
Now you can define what you want DBforBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
Next you can specify a query that will be executed and if return ‘RaceConditionValue’ the query ‘customQueryItemName’ is executed, otherwise it is skipped&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] &lt;br /&gt;
if true query is executed otherwise skipped&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
    FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
    ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes \&lt;br /&gt;
  FROM v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true then add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=192</id>
		<title>DBforBIX</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=192"/>
				<updated>2016-10-23T08:23:17Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Common (Universal) Installation Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.6 you can run DbforBIX.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DBforBIX.&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
* DBforBIX distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.0&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
* db2jcc_license_cu.jar (DB2)&lt;br /&gt;
* db2jcc.jar (DB2)&lt;br /&gt;
* ojdbc6.jar (Oracle)&lt;br /&gt;
* jconn4d.jar (Sybase Anywhere)&lt;br /&gt;
* mbfjdbc2.jar (HP Allbase)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Common Part&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
Install the JAVA JVM &amp;gt;= 1.7 (both Oracle and OpenJDK works properly)&lt;br /&gt;
&lt;br /&gt;
Install JSVC (Java daemon launcher)&lt;br /&gt;
&lt;br /&gt;
Copy config.properties.sample to config.properties and change it adding your databases.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Initd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Now for all the distribution that are still using initd use the following procedure:&lt;br /&gt;
&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If your distribution uses systemd, like most of the nowadays here are the steps:&lt;br /&gt;
&lt;br /&gt;
Copy the systemd included files&lt;br /&gt;
&lt;br /&gt;
  cp systemd/dbforbix.service /etc/systemd/system/dbforbix.service&lt;br /&gt;
&lt;br /&gt;
Notify systemd that a new dbforbix.service file exists by executing the following command as root:&lt;br /&gt;
&lt;br /&gt;
  systemctl daemon-reload&lt;br /&gt;
  systemctl start dbforbix.service&lt;br /&gt;
&lt;br /&gt;
To configure the service to start at each boot run (from root console):&lt;br /&gt;
&lt;br /&gt;
  systemctl enable name.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like to test dbforbix from command line you can simply type:&lt;br /&gt;
&lt;br /&gt;
  java -jar dbforbix.jar -a start -C /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixw.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixw.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
  ZabbixServerList&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
DBforBIX can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
  ZabbixServerList=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  ZabbixServer1.Address=192.168.0.1&lt;br /&gt;
  ZabbixServer1.Port=10051&lt;br /&gt;
  ZabbixServer2.Address=192.168.0.2&lt;br /&gt;
  ZabbixServer2.Port=10051&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIXDaemon&lt;br /&gt;
Entries under this tag allow you to set your DBforBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
 #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the DBforBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by DB, now this parameter&lt;br /&gt;
&lt;br /&gt;
if not set is automatically calculated.&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
  DBforBIX.MaxThreadNumber=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/dbforbix/logs&lt;br /&gt;
  DBforBIX.PidFile=./logs/dbforbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  DatabaseList&lt;br /&gt;
Entries under this heading allow you to configure your database list information:&lt;br /&gt;
  #put here your databases in a comma separated list&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
  DatabaseList=EXAMPLE1,...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The names of the instances must match those you have specified as your HOST name in Zabbix&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, DBforBIX will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxWait=100&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information .&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.Url=write here your database Url should be in the form:&lt;br /&gt;
  Oracle	=	jdbc:oracle:thin:@&amp;lt;host&amp;gt;:&amp;lt;LISTENER_PORT&amp;gt;:&amp;lt;instance&amp;gt;&lt;br /&gt;
  PostgreSQL	=	jdbc:postgresql://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt;&lt;br /&gt;
  MS Sql Server	=	jdbc:jtds:sqlserver://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;instancename&amp;gt;&lt;br /&gt;
  MySQL Server	=	jdbc:mysql://[host:port],[host:port].../[database]&lt;br /&gt;
  DB2		=	jdbc:db2://&amp;lt;servername&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;installation&amp;gt;&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
  EXAMPLE1.DatabaseType=&amp;lt;databasetype&amp;gt;&lt;br /&gt;
where &amp;lt;databasetype&amp;gt; can be = [oracle]|[pgsql]|[mssql]|[mysql]|[db2]&lt;br /&gt;
it depend from your database&lt;br /&gt;
  EXAMPLE1.QueryListFile=&amp;lt;path to query file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Query List File&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the databases specific queries (SQL) queries can be found. This is a customizable file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to specify the query parameter file:&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props &lt;br /&gt;
This entry will specify the query file of a database relative path are allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most common query files are included in DBforBIX distribution you need to rename and remove “.sample”&lt;br /&gt;
&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customized queries through DBforBIX against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Item names must be unique. The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
  #QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  #Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the&lt;br /&gt;
QueryList, followed by &amp;#039;.Query&amp;#039; for DBforBIX to recognise that this is the query string.&lt;br /&gt;
It’s important to remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
Now you can define what you want DBforBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
Next you can specify a query that will be executed and if return ‘RaceConditionValue’ the query ‘customQueryItemName’ is executed, otherwise it is skipped&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] &lt;br /&gt;
if true query is executed otherwise skipped&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
    FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
    ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes \&lt;br /&gt;
  FROM v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true then add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=191</id>
		<title>DBforBIX</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=191"/>
				<updated>2016-10-23T08:22:56Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Common (Universal) Installation Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.6 you can run DbforBIX.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DBforBIX.&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
* DBforBIX distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.0&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
* db2jcc_license_cu.jar (DB2)&lt;br /&gt;
* db2jcc.jar (DB2)&lt;br /&gt;
* ojdbc6.jar (Oracle)&lt;br /&gt;
* jconn4d.jar (Sybase Anywhere)&lt;br /&gt;
* mbfjdbc2.jar (HP Allbase)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Common Part&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
Install the JAVA JVM &amp;gt;= 1.7 (both Oracle and OpenJDK works properly)&lt;br /&gt;
&lt;br /&gt;
Install JSVC (Java daemon launcher)&lt;br /&gt;
&lt;br /&gt;
Copy config.properties.sample to config.properties and change it adding your databases.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Init&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Now for all the distribution that are still using initd use the following procedure:&lt;br /&gt;
&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Systemd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If your distribution uses systemd, like most of the nowadays here are the steps:&lt;br /&gt;
&lt;br /&gt;
Copy the systemd included files&lt;br /&gt;
&lt;br /&gt;
  cp systemd/dbforbix.service /etc/systemd/system/dbforbix.service&lt;br /&gt;
&lt;br /&gt;
Notify systemd that a new dbforbix.service file exists by executing the following command as root:&lt;br /&gt;
&lt;br /&gt;
  systemctl daemon-reload&lt;br /&gt;
  systemctl start dbforbix.service&lt;br /&gt;
&lt;br /&gt;
To configure the service to start at each boot run (from root console):&lt;br /&gt;
&lt;br /&gt;
  systemctl enable name.service&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like to test dbforbix from command line you can simply type:&lt;br /&gt;
&lt;br /&gt;
  java -jar dbforbix.jar -a start -C /opt/dbforbix&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixw.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixw.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
  ZabbixServerList&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
DBforBIX can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
  ZabbixServerList=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  ZabbixServer1.Address=192.168.0.1&lt;br /&gt;
  ZabbixServer1.Port=10051&lt;br /&gt;
  ZabbixServer2.Address=192.168.0.2&lt;br /&gt;
  ZabbixServer2.Port=10051&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIXDaemon&lt;br /&gt;
Entries under this tag allow you to set your DBforBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
 #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the DBforBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by DB, now this parameter&lt;br /&gt;
&lt;br /&gt;
if not set is automatically calculated.&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
  DBforBIX.MaxThreadNumber=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/dbforbix/logs&lt;br /&gt;
  DBforBIX.PidFile=./logs/dbforbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  DatabaseList&lt;br /&gt;
Entries under this heading allow you to configure your database list information:&lt;br /&gt;
  #put here your databases in a comma separated list&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
  DatabaseList=EXAMPLE1,...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The names of the instances must match those you have specified as your HOST name in Zabbix&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, DBforBIX will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxWait=100&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information .&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.Url=write here your database Url should be in the form:&lt;br /&gt;
  Oracle	=	jdbc:oracle:thin:@&amp;lt;host&amp;gt;:&amp;lt;LISTENER_PORT&amp;gt;:&amp;lt;instance&amp;gt;&lt;br /&gt;
  PostgreSQL	=	jdbc:postgresql://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt;&lt;br /&gt;
  MS Sql Server	=	jdbc:jtds:sqlserver://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;instancename&amp;gt;&lt;br /&gt;
  MySQL Server	=	jdbc:mysql://[host:port],[host:port].../[database]&lt;br /&gt;
  DB2		=	jdbc:db2://&amp;lt;servername&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;installation&amp;gt;&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
  EXAMPLE1.DatabaseType=&amp;lt;databasetype&amp;gt;&lt;br /&gt;
where &amp;lt;databasetype&amp;gt; can be = [oracle]|[pgsql]|[mssql]|[mysql]|[db2]&lt;br /&gt;
it depend from your database&lt;br /&gt;
  EXAMPLE1.QueryListFile=&amp;lt;path to query file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Query List File&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the databases specific queries (SQL) queries can be found. This is a customizable file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to specify the query parameter file:&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props &lt;br /&gt;
This entry will specify the query file of a database relative path are allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most common query files are included in DBforBIX distribution you need to rename and remove “.sample”&lt;br /&gt;
&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customized queries through DBforBIX against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Item names must be unique. The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
  #QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  #Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the&lt;br /&gt;
QueryList, followed by &amp;#039;.Query&amp;#039; for DBforBIX to recognise that this is the query string.&lt;br /&gt;
It’s important to remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
Now you can define what you want DBforBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
Next you can specify a query that will be executed and if return ‘RaceConditionValue’ the query ‘customQueryItemName’ is executed, otherwise it is skipped&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] &lt;br /&gt;
if true query is executed otherwise skipped&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
    FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
    ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes \&lt;br /&gt;
  FROM v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true then add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=190</id>
		<title>Orabbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=190"/>
				<updated>2015-10-19T07:57:40Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=ORABBIX=&lt;br /&gt;
[[File:orabbix_logo.png]]&lt;br /&gt;
=Authors=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Download &amp;amp; Installation Instructions=&lt;br /&gt;
&lt;br /&gt;
=About Orabbix=&lt;br /&gt;
==Product Description==&lt;br /&gt;
Orabbix is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for Oracle Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous Oracle instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Orabbix_architecture.png|frame|none|alt=Orabbix Architecture|Fig. 1 - Orabbix Architecture]]&lt;br /&gt;
&lt;br /&gt;
==What can it monitor?==&lt;br /&gt;
Below are some examples of what Orabbix is capable of monitoring:&lt;br /&gt;
* DB Version (i.e. Validity of package)&amp;lt;br&amp;gt;&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&amp;lt;br&amp;gt;&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages, Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize)&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_ARCHIVELOG.png|frame|none|alt=Orabbix Archivelog|Fig. 2 - Orabbix Archivelog]]&lt;br /&gt;
[[Image:Orabbix_DBSIZEFILESIZE.png|frame|none|alt=Orabbix DBFileSize|Fig. 3 - Orabbix DBFileSize]]&lt;br /&gt;
[[Image:Orabbix_EVENTWAITS.png|frame|none|alt=Orabbix Events Waits|Fig. 4 - Orabbix Events Waits]]&lt;br /&gt;
[[Image:Orabbix_SHAREDPOOL.png|frame|none|alt=Orabbix Shared Pool|Fig. 5 - Orabbix SHared Pool]]&lt;br /&gt;
[[Image:Orabbix_SGA.png|frame|none|alt=Orabbix SGA|Fig. 6 - Orabbix SGA]]&lt;br /&gt;
[[Image:Orabbix_PINHITRATIO.png|frame|none|alt=Orabbix Pin Hit Ratio|Fig. 7 - Orabbix Pin Hit Ratio]]&lt;br /&gt;
[[Image:Orabbix_SESSIONS.png|frame|none|alt=Orabbix Sessions|Fig. 8 - Orabbix Sessions]]&lt;br /&gt;
[[Image:Orabbix_SESSIONPROCESS.png|frame|none|alt=Orabbix Sessions Processes|Fig. 9 - Orabbix Sessions Processes]]&lt;br /&gt;
[[Image:Orabbix_PGA.png|frame|none|alt=Orabbix PGA|Fig. 10 - PGA]]&lt;br /&gt;
[[Image:Orabbix_LIO.png|frame|none|alt=Orabbix Logical I/O|Fig. 11 - Logical I/O]]&lt;br /&gt;
[[Image:Orabbix_PHIO.png|frame|none|alt=Orabbix Physical I/O|Fig. 12 - Physical I/O]]&lt;br /&gt;
&lt;br /&gt;
==Orabbix Author==&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the Orabbix plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666 &amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of Orabbix at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use Orabbix, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested Oracle host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an Oracle client of any kind for Orabbix to work.&lt;br /&gt;
  Orabbix uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require an Oracle client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x Oracle Server. If you are planning on monitoring an Oracle instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring Orabbix to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download Orabbix to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip Orabbix to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for Orabbix to access your Oracle Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; if you need an User (ZABBIX) for Orabbix with the minimum grants available, you can use the following script:&lt;br /&gt;
&lt;br /&gt;
 CREATE USER ZABBIX&lt;br /&gt;
 IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
 DEFAULT TABLESPACE USERS&lt;br /&gt;
 TEMPORARY TABLESPACE TEMP&lt;br /&gt;
 PROFILE DEFAULT&lt;br /&gt;
 ACCOUNT UNLOCK;&lt;br /&gt;
 GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CONNECT TO ZABBIX;&lt;br /&gt;
 ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
 GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or Oracle instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your Orabbix setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and Oracle.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
Orabbix can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating Orabbix data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===OrabbixDaemon===&lt;br /&gt;
Entries under this tag allow you to set your Orabbix Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the Orabbix Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by Orabbix, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the Orabbix Daemon, it is possible to clone Orabbix and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, Orabbix  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the Oracle (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; Oracle Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through Orabbix against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for Orabbix to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want Orabbix to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, Orabbix would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, Orabbix would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use Orabbix/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The Orabbix daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.Orabbix.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “OrabbixDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
Orabbix is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=189</id>
		<title>Orabbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=189"/>
				<updated>2014-01-06T07:16:07Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* How to Use Orabbix/FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=ORABBIX=&lt;br /&gt;
[[File:orabbix_logo.png]]&lt;br /&gt;
=Authors=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=Download &amp;amp; Installation Instructions=&lt;br /&gt;
&lt;br /&gt;
=About Orabbix=&lt;br /&gt;
==Product Description==&lt;br /&gt;
Orabbix is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for Oracle Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous Oracle instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Orabbix_architecture.png|frame|none|alt=Orabbix Architecture|Fig. 1 - Orabbix Architecture]]&lt;br /&gt;
&lt;br /&gt;
==What can it monitor?==&lt;br /&gt;
Below are some examples of what Orabbix is capable of monitoring:&lt;br /&gt;
* DB Version (i.e. Validity of package)&amp;lt;br&amp;gt;&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&amp;lt;br&amp;gt;&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages, Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize)&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_ARCHIVELOG.png|frame|none|alt=Orabbix Archivelog|Fig. 2 - Orabbix Archivelog]]&lt;br /&gt;
[[Image:Orabbix_DBSIZEFILESIZE.png|frame|none|alt=Orabbix DBFileSize|Fig. 3 - Orabbix DBFileSize]]&lt;br /&gt;
[[Image:Orabbix_EVENTWAITS.png|frame|none|alt=Orabbix Events Waits|Fig. 4 - Orabbix Events Waits]]&lt;br /&gt;
[[Image:Orabbix_SHAREDPOOL.png|frame|none|alt=Orabbix Shared Pool|Fig. 5 - Orabbix SHared Pool]]&lt;br /&gt;
[[Image:Orabbix_SGA.png|frame|none|alt=Orabbix SGA|Fig. 6 - Orabbix SGA]]&lt;br /&gt;
[[Image:Orabbix_PINHITRATIO.png|frame|none|alt=Orabbix Pin Hit Ratio|Fig. 7 - Orabbix Pin Hit Ratio]]&lt;br /&gt;
[[Image:Orabbix_SESSIONS.png|frame|none|alt=Orabbix Sessions|Fig. 8 - Orabbix Sessions]]&lt;br /&gt;
[[Image:Orabbix_SESSIONPROCESS.png|frame|none|alt=Orabbix Sessions Processes|Fig. 9 - Orabbix Sessions Processes]]&lt;br /&gt;
[[Image:Orabbix_PGA.png|frame|none|alt=Orabbix PGA|Fig. 10 - PGA]]&lt;br /&gt;
[[Image:Orabbix_LIO.png|frame|none|alt=Orabbix Logical I/O|Fig. 11 - Logical I/O]]&lt;br /&gt;
[[Image:Orabbix_PHIO.png|frame|none|alt=Orabbix Physical I/O|Fig. 12 - Physical I/O]]&lt;br /&gt;
&lt;br /&gt;
==Orabbix Author==&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the Orabbix plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666 &amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of Orabbix at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use Orabbix, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested Oracle host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an Oracle client of any kind for Orabbix to work.&lt;br /&gt;
  Orabbix uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require an Oracle client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x Oracle Server. If you are planning on monitoring an Oracle instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring Orabbix to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download Orabbix to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip Orabbix to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for Orabbix to access your Oracle Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; if you need an User (ZABBIX) for Orabbix with the minimum grants available, you can use the following script:&lt;br /&gt;
&lt;br /&gt;
 CREATE USER ZABBIX&lt;br /&gt;
 IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
 DEFAULT TABLESPACE USERS&lt;br /&gt;
 TEMPORARY TABLESPACE TEMP&lt;br /&gt;
 PROFILE DEFAULT&lt;br /&gt;
 ACCOUNT UNLOCK;&lt;br /&gt;
 GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CONNECT TO ZABBIX;&lt;br /&gt;
 ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
 GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or Oracle instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your Orabbix setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and Oracle.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
Orabbix can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating Orabbix data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===OrabbixDaemon===&lt;br /&gt;
Entries under this tag allow you to set your Orabbix Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the Orabbix Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by Orabbix, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the Orabbix Daemon, it is possible to clone Orabbix and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, Orabbix  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the Oracle (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; Oracle Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through Orabbix against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for Orabbix to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want Orabbix to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, Orabbix would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, Orabbix would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use Orabbix/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The Orabbix daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.Orabbix.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “OrabbixDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
Orabbix is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=188</id>
		<title>Orabbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=188"/>
				<updated>2014-01-06T07:15:49Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* How to Use Orabbix/FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=ORABBIX=&lt;br /&gt;
[[File:orabbix_logo.png]]&lt;br /&gt;
=Authors=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=Download &amp;amp; Installation Instructions=&lt;br /&gt;
&lt;br /&gt;
=About Orabbix=&lt;br /&gt;
==Product Description==&lt;br /&gt;
Orabbix is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for Oracle Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous Oracle instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Orabbix_architecture.png|frame|none|alt=Orabbix Architecture|Fig. 1 - Orabbix Architecture]]&lt;br /&gt;
&lt;br /&gt;
==What can it monitor?==&lt;br /&gt;
Below are some examples of what Orabbix is capable of monitoring:&lt;br /&gt;
* DB Version (i.e. Validity of package)&amp;lt;br&amp;gt;&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&amp;lt;br&amp;gt;&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages, Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize)&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_ARCHIVELOG.png|frame|none|alt=Orabbix Archivelog|Fig. 2 - Orabbix Archivelog]]&lt;br /&gt;
[[Image:Orabbix_DBSIZEFILESIZE.png|frame|none|alt=Orabbix DBFileSize|Fig. 3 - Orabbix DBFileSize]]&lt;br /&gt;
[[Image:Orabbix_EVENTWAITS.png|frame|none|alt=Orabbix Events Waits|Fig. 4 - Orabbix Events Waits]]&lt;br /&gt;
[[Image:Orabbix_SHAREDPOOL.png|frame|none|alt=Orabbix Shared Pool|Fig. 5 - Orabbix SHared Pool]]&lt;br /&gt;
[[Image:Orabbix_SGA.png|frame|none|alt=Orabbix SGA|Fig. 6 - Orabbix SGA]]&lt;br /&gt;
[[Image:Orabbix_PINHITRATIO.png|frame|none|alt=Orabbix Pin Hit Ratio|Fig. 7 - Orabbix Pin Hit Ratio]]&lt;br /&gt;
[[Image:Orabbix_SESSIONS.png|frame|none|alt=Orabbix Sessions|Fig. 8 - Orabbix Sessions]]&lt;br /&gt;
[[Image:Orabbix_SESSIONPROCESS.png|frame|none|alt=Orabbix Sessions Processes|Fig. 9 - Orabbix Sessions Processes]]&lt;br /&gt;
[[Image:Orabbix_PGA.png|frame|none|alt=Orabbix PGA|Fig. 10 - PGA]]&lt;br /&gt;
[[Image:Orabbix_LIO.png|frame|none|alt=Orabbix Logical I/O|Fig. 11 - Logical I/O]]&lt;br /&gt;
[[Image:Orabbix_PHIO.png|frame|none|alt=Orabbix Physical I/O|Fig. 12 - Physical I/O]]&lt;br /&gt;
&lt;br /&gt;
==Orabbix Author==&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the Orabbix plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666 &amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of Orabbix at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use Orabbix, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested Oracle host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an Oracle client of any kind for Orabbix to work.&lt;br /&gt;
  Orabbix uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require an Oracle client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x Oracle Server. If you are planning on monitoring an Oracle instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring Orabbix to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download Orabbix to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip Orabbix to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for Orabbix to access your Oracle Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; if you need an User (ZABBIX) for Orabbix with the minimum grants available, you can use the following script:&lt;br /&gt;
&lt;br /&gt;
 CREATE USER ZABBIX&lt;br /&gt;
 IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
 DEFAULT TABLESPACE USERS&lt;br /&gt;
 TEMPORARY TABLESPACE TEMP&lt;br /&gt;
 PROFILE DEFAULT&lt;br /&gt;
 ACCOUNT UNLOCK;&lt;br /&gt;
 GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CONNECT TO ZABBIX;&lt;br /&gt;
 ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
 GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or Oracle instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your Orabbix setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and Oracle.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
Orabbix can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating Orabbix data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===OrabbixDaemon===&lt;br /&gt;
Entries under this tag allow you to set your Orabbix Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the Orabbix Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by Orabbix, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the Orabbix Daemon, it is possible to clone Orabbix and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, Orabbix  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the Oracle (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; Oracle Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through Orabbix against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for Orabbix to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want Orabbix to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, Orabbix would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, Orabbix would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use Orabbix/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The Orabbix daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.Orabbix.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcoracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “OrabbixDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
Orabbix is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=187</id>
		<title>Orabbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=187"/>
				<updated>2013-07-08T10:13:00Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=ORABBIX=&lt;br /&gt;
[[File:orabbix_logo.png]]&lt;br /&gt;
=Authors=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=Download &amp;amp; Installation Instructions=&lt;br /&gt;
&lt;br /&gt;
=About Orabbix=&lt;br /&gt;
==Product Description==&lt;br /&gt;
Orabbix is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for Oracle Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous Oracle instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Orabbix_architecture.png|frame|none|alt=Orabbix Architecture|Fig. 1 - Orabbix Architecture]]&lt;br /&gt;
&lt;br /&gt;
==What can it monitor?==&lt;br /&gt;
Below are some examples of what Orabbix is capable of monitoring:&lt;br /&gt;
* DB Version (i.e. Validity of package)&amp;lt;br&amp;gt;&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&amp;lt;br&amp;gt;&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages, Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize)&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_ARCHIVELOG.png|frame|none|alt=Orabbix Archivelog|Fig. 2 - Orabbix Archivelog]]&lt;br /&gt;
[[Image:Orabbix_DBSIZEFILESIZE.png|frame|none|alt=Orabbix DBFileSize|Fig. 3 - Orabbix DBFileSize]]&lt;br /&gt;
[[Image:Orabbix_EVENTWAITS.png|frame|none|alt=Orabbix Events Waits|Fig. 4 - Orabbix Events Waits]]&lt;br /&gt;
[[Image:Orabbix_SHAREDPOOL.png|frame|none|alt=Orabbix Shared Pool|Fig. 5 - Orabbix SHared Pool]]&lt;br /&gt;
[[Image:Orabbix_SGA.png|frame|none|alt=Orabbix SGA|Fig. 6 - Orabbix SGA]]&lt;br /&gt;
[[Image:Orabbix_PINHITRATIO.png|frame|none|alt=Orabbix Pin Hit Ratio|Fig. 7 - Orabbix Pin Hit Ratio]]&lt;br /&gt;
[[Image:Orabbix_SESSIONS.png|frame|none|alt=Orabbix Sessions|Fig. 8 - Orabbix Sessions]]&lt;br /&gt;
[[Image:Orabbix_SESSIONPROCESS.png|frame|none|alt=Orabbix Sessions Processes|Fig. 9 - Orabbix Sessions Processes]]&lt;br /&gt;
[[Image:Orabbix_PGA.png|frame|none|alt=Orabbix PGA|Fig. 10 - PGA]]&lt;br /&gt;
[[Image:Orabbix_LIO.png|frame|none|alt=Orabbix Logical I/O|Fig. 11 - Logical I/O]]&lt;br /&gt;
[[Image:Orabbix_PHIO.png|frame|none|alt=Orabbix Physical I/O|Fig. 12 - Physical I/O]]&lt;br /&gt;
&lt;br /&gt;
==Orabbix Author==&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the Orabbix plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666 &amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of Orabbix at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use Orabbix, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested Oracle host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an Oracle client of any kind for Orabbix to work.&lt;br /&gt;
  Orabbix uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require an Oracle client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x Oracle Server. If you are planning on monitoring an Oracle instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring Orabbix to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download Orabbix to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip Orabbix to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for Orabbix to access your Oracle Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; if you need an User (ZABBIX) for Orabbix with the minimum grants available, you can use the following script:&lt;br /&gt;
&lt;br /&gt;
 CREATE USER ZABBIX&lt;br /&gt;
 IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
 DEFAULT TABLESPACE USERS&lt;br /&gt;
 TEMPORARY TABLESPACE TEMP&lt;br /&gt;
 PROFILE DEFAULT&lt;br /&gt;
 ACCOUNT UNLOCK;&lt;br /&gt;
 GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CONNECT TO ZABBIX;&lt;br /&gt;
 ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
 GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or Oracle instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your Orabbix setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and Oracle.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
Orabbix can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating Orabbix data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===OrabbixDaemon===&lt;br /&gt;
Entries under this tag allow you to set your Orabbix Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the Orabbix Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by Orabbix, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the Orabbix Daemon, it is possible to clone Orabbix and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, Orabbix  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the Oracle (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; Oracle Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through Orabbix against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for Orabbix to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want Orabbix to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, Orabbix would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, Orabbix would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use Orabbix/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The Orabbix daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.Orabbix.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “OrabbixDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
Orabbix is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=186</id>
		<title>Orabbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=186"/>
				<updated>2013-07-08T09:32:29Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;ORABBIX&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:orabbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;About Orabbix&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
Orabbix is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for Oracle Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous Oracle instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Orabbix_architecture.png|frame|none|alt=Orabbix Architecture|Fig. 1 - Orabbix Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what Orabbix is capable of monitoring:&lt;br /&gt;
* DB Version (i.e. Validity of package)&amp;lt;br&amp;gt;&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&amp;lt;br&amp;gt;&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages, Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize)&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_ARCHIVELOG.png|frame|none|alt=Orabbix Archivelog|Fig. 2 - Orabbix Archivelog]]&lt;br /&gt;
[[Image:Orabbix_DBSIZEFILESIZE.png|frame|none|alt=Orabbix DBFileSize|Fig. 3 - Orabbix DBFileSize]]&lt;br /&gt;
[[Image:Orabbix_EVENTWAITS.png|frame|none|alt=Orabbix Events Waits|Fig. 4 - Orabbix Events Waits]]&lt;br /&gt;
[[Image:Orabbix_SHAREDPOOL.png|frame|none|alt=Orabbix Shared Pool|Fig. 5 - Orabbix SHared Pool]]&lt;br /&gt;
[[Image:Orabbix_SGA.png|frame|none|alt=Orabbix SGA|Fig. 6 - Orabbix SGA]]&lt;br /&gt;
[[Image:Orabbix_PINHITRATIO.png|frame|none|alt=Orabbix Pin Hit Ratio|Fig. 7 - Orabbix Pin Hit Ratio]]&lt;br /&gt;
[[Image:Orabbix_SESSIONS.png|frame|none|alt=Orabbix Sessions|Fig. 8 - Orabbix Sessions]]&lt;br /&gt;
[[Image:Orabbix_SESSIONPROCESS.png|frame|none|alt=Orabbix Sessions Processes|Fig. 9 - Orabbix Sessions Processes]]&lt;br /&gt;
[[Image:Orabbix_PGA.png|frame|none|alt=Orabbix PGA|Fig. 10 - PGA]]&lt;br /&gt;
[[Image:Orabbix_LIO.png|frame|none|alt=Orabbix Logical I/O|Fig. 11 - Logical I/O]]&lt;br /&gt;
[[Image:Orabbix_PHIO.png|frame|none|alt=Orabbix Physical I/O|Fig. 12 - Physical I/O]]&lt;br /&gt;
&lt;br /&gt;
==Orabbix Author==&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the Orabbix plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666 &amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of Orabbix at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use Orabbix, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested Oracle host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an Oracle client of any kind for Orabbix to work.&lt;br /&gt;
  Orabbix uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require an Oracle client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x Oracle Server. If you are planning on monitoring an Oracle instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring Orabbix to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download Orabbix to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip Orabbix to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for Orabbix to access your Oracle Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; if you need an User (ZABBIX) for Orabbix with the minimum grants available, you can use the following script:&lt;br /&gt;
&lt;br /&gt;
 CREATE USER ZABBIX&lt;br /&gt;
 IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
 DEFAULT TABLESPACE USERS&lt;br /&gt;
 TEMPORARY TABLESPACE TEMP&lt;br /&gt;
 PROFILE DEFAULT&lt;br /&gt;
 ACCOUNT UNLOCK;&lt;br /&gt;
 GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CONNECT TO ZABBIX;&lt;br /&gt;
 ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
 GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or Oracle instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your Orabbix setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and Oracle.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
Orabbix can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating Orabbix data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===OrabbixDaemon===&lt;br /&gt;
Entries under this tag allow you to set your Orabbix Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the Orabbix Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by Orabbix, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the Orabbix Daemon, it is possible to clone Orabbix and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, Orabbix  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the Oracle (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; Oracle Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through Orabbix against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for Orabbix to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want Orabbix to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, Orabbix would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, Orabbix would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use Orabbix/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The Orabbix daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.Orabbix.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “OrabbixDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
Orabbix is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Main_Page&amp;diff=185</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Main_Page&amp;diff=185"/>
				<updated>2013-07-08T09:30:20Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;SmartMarmot Wiki Pages.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_logo.png|320px|link=Orabbix]] &amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DBforBIX.png|320px|link=DBforBIX]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:postbix_logo.png|320px|link=PostBIX]]&amp;lt;br&amp;gt;&lt;br /&gt;
*[[mysqlbix |MySQLBIX]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=184</id>
		<title>DBforBIX</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=184"/>
				<updated>2012-03-12T11:58:25Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.6 you can run DbforBIX.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DBforBIX.&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
* DBforBIX distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.0&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
* db2jcc_license_cu.jar (DB2)&lt;br /&gt;
* db2jcc.jar (DB2)&lt;br /&gt;
* ojdbc6.jar (Oracle)&lt;br /&gt;
* jconn4d.jar (Sybase Anywhere)&lt;br /&gt;
* mbfjdbc2.jar (HP Allbase)&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixw.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixw.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
  ZabbixServerList&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
DBforBIX can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
  ZabbixServerList=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  ZabbixServer1.Address=192.168.0.1&lt;br /&gt;
  ZabbixServer1.Port=10051&lt;br /&gt;
  ZabbixServer2.Address=192.168.0.2&lt;br /&gt;
  ZabbixServer2.Port=10051&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIXDaemon&lt;br /&gt;
Entries under this tag allow you to set your DBforBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
 #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the DBforBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by DB, now this parameter&lt;br /&gt;
&lt;br /&gt;
if not set is automatically calculated.&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
  DBforBIX.MaxThreadNumber=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/dbforbix/logs&lt;br /&gt;
  DBforBIX.PidFile=./logs/dbforbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  DatabaseList&lt;br /&gt;
Entries under this heading allow you to configure your database list information:&lt;br /&gt;
  #put here your databases in a comma separated list&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
  DatabaseList=EXAMPLE1,...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The names of the instances must match those you have specified as your HOST name in Zabbix&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, DBforBIX will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxWait=100&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information .&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.Url=write here your database Url should be in the form:&lt;br /&gt;
  Oracle	=	jdbc:oracle:thin:@&amp;lt;host&amp;gt;:&amp;lt;LISTENER_PORT&amp;gt;:&amp;lt;instance&amp;gt;&lt;br /&gt;
  PostgreSQL	=	jdbc:postgresql://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt;&lt;br /&gt;
  MS Sql Server	=	jdbc:jtds:sqlserver://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;instancename&amp;gt;&lt;br /&gt;
  MySQL Server	=	jdbc:mysql://[host:port],[host:port].../[database]&lt;br /&gt;
  DB2		=	jdbc:db2://&amp;lt;servername&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;installation&amp;gt;&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
  EXAMPLE1.DatabaseType=&amp;lt;databasetype&amp;gt;&lt;br /&gt;
where &amp;lt;databasetype&amp;gt; can be = [oracle]|[pgsql]|[mssql]|[mysql]|[db2]&lt;br /&gt;
it depend from your database&lt;br /&gt;
  EXAMPLE1.QueryListFile=&amp;lt;path to query file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Query List File&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the databases specific queries (SQL) queries can be found. This is a customizable file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to specify the query parameter file:&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props &lt;br /&gt;
This entry will specify the query file of a database relative path are allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most common query files are included in DBforBIX distribution you need to rename and remove “.sample”&lt;br /&gt;
&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customized queries through DBforBIX against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Item names must be unique. The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
  #QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  #Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the&lt;br /&gt;
QueryList, followed by &amp;#039;.Query&amp;#039; for DBforBIX to recognise that this is the query string.&lt;br /&gt;
It’s important to remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
Now you can define what you want DBforBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
Next you can specify a query that will be executed and if return ‘RaceConditionValue’ the query ‘customQueryItemName’ is executed, otherwise it is skipped&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] &lt;br /&gt;
if true query is executed otherwise skipped&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
    FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
    ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes \&lt;br /&gt;
  FROM v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true then add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=183</id>
		<title>DBforBIX</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=183"/>
				<updated>2012-03-12T11:56:03Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.6 you can run DbforBIX.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
* Sybase Anywhere&lt;br /&gt;
* HP Allbase&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On Sybase Anywhere&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
On HP ALLBASE&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Distribution==&lt;br /&gt;
&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DBforBIX.&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
* DBforBIX distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.0&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
db2jcc_license_cu.jar&lt;br /&gt;
db2jcc.jar&lt;br /&gt;
ojdbc6.jar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixw.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixw.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Install steps for Oracle===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; To create a User (ZABBIX) for DBforBIX with MINIMAL grants you can use the following script:&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE USERS&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
   GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
 &lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
  ZabbixServerList&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
DBforBIX can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
  ZabbixServerList=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  ZabbixServer1.Address=192.168.0.1&lt;br /&gt;
  ZabbixServer1.Port=10051&lt;br /&gt;
  ZabbixServer2.Address=192.168.0.2&lt;br /&gt;
  ZabbixServer2.Port=10051&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIXDaemon&lt;br /&gt;
Entries under this tag allow you to set your DBforBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
 #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the DBforBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by DB, now this parameter&lt;br /&gt;
&lt;br /&gt;
if not set is automatically calculated.&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
  DBforBIX.MaxThreadNumber=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/dbforbix/logs&lt;br /&gt;
  DBforBIX.PidFile=./logs/dbforbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  DatabaseList&lt;br /&gt;
Entries under this heading allow you to configure your database list information:&lt;br /&gt;
  #put here your databases in a comma separated list&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
  DatabaseList=EXAMPLE1,...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The names of the instances must match those you have specified as your HOST name in Zabbix&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, DBforBIX will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxWait=100&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information .&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.Url=write here your database Url should be in the form:&lt;br /&gt;
  Oracle	=	jdbc:oracle:thin:@&amp;lt;host&amp;gt;:&amp;lt;LISTENER_PORT&amp;gt;:&amp;lt;instance&amp;gt;&lt;br /&gt;
  PostgreSQL	=	jdbc:postgresql://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt;&lt;br /&gt;
  MS Sql Server	=	jdbc:jtds:sqlserver://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;instancename&amp;gt;&lt;br /&gt;
  MySQL Server	=	jdbc:mysql://[host:port],[host:port].../[database]&lt;br /&gt;
  DB2		=	jdbc:db2://&amp;lt;servername&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;installation&amp;gt;&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
  EXAMPLE1.DatabaseType=&amp;lt;databasetype&amp;gt;&lt;br /&gt;
where &amp;lt;databasetype&amp;gt; can be = [oracle]|[pgsql]|[mssql]|[mysql]|[db2]&lt;br /&gt;
it depend from your database&lt;br /&gt;
  EXAMPLE1.QueryListFile=&amp;lt;path to query file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Query List File&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the databases specific queries (SQL) queries can be found. This is a customizable file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to specify the query parameter file:&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props &lt;br /&gt;
This entry will specify the query file of a database relative path are allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most common query files are included in DBforBIX distribution you need to rename and remove “.sample”&lt;br /&gt;
&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customized queries through DBforBIX against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Item names must be unique. The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
  #QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  #Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the&lt;br /&gt;
QueryList, followed by &amp;#039;.Query&amp;#039; for DBforBIX to recognise that this is the query string.&lt;br /&gt;
It’s important to remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
Now you can define what you want DBforBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
Next you can specify a query that will be executed and if return ‘RaceConditionValue’ the query ‘customQueryItemName’ is executed, otherwise it is skipped&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] &lt;br /&gt;
if true query is executed otherwise skipped&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
    FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
    ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes \&lt;br /&gt;
  FROM v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true then add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:Dbforbix_architecture_full.png&amp;diff=182</id>
		<title>File:Dbforbix architecture full.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:Dbforbix_architecture_full.png&amp;diff=182"/>
				<updated>2012-03-12T11:25:50Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: new release with HP ALLBASE ans Sybase&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;new release with HP ALLBASE ans Sybase&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=181</id>
		<title>DBforBIX</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=DBforBIX&amp;diff=181"/>
				<updated>2012-03-12T11:24:51Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* About DBforBix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==About DBforBix==&lt;br /&gt;
[[Image:Dbforbix_architecture_full.png|frame|none|alt=DBforBIX Architecture|Fig. 1 - DBforBIX Architecture]]&lt;br /&gt;
DBforBIX is a daemon designed to work in combination with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for the many kind of different databases, along with server performance metrics.&lt;br /&gt;
&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous databases installation, and in turn provides this information for monitoring and performance metrics to your Zabbix server.&lt;br /&gt;
&lt;br /&gt;
You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&lt;br /&gt;
&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment.&amp;lt;br&amp;gt;&lt;br /&gt;
However these can be fine tuned to suit your needs and data/monitoring requirements.&lt;br /&gt;
&lt;br /&gt;
DBforBIX can run as a Windows Service and is able to work on many different environments. Where is available a JRE 1.6 you can run DbforBIX.&lt;br /&gt;
History&lt;br /&gt;
&lt;br /&gt;
You can read about the history and evolution of the DBforBIX plug-in in these threads below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666&amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&amp;lt;br&amp;gt;&lt;br /&gt;
The origins of DBforBIX can be traced though Orabbix, PostBIX, MySQLBIX and DB2Bix, and as such inherits all its predecessors benefits.&lt;br /&gt;
&lt;br /&gt;
==Author==&lt;br /&gt;
DBforBIX was developed and written by:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039;&amp;#039; : http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
==Supported Databases==&lt;br /&gt;
DBforBIX can acquire and retrieve every kind performance parameter and vital statistic that is supported or available through standard queries.&lt;br /&gt;
 &lt;br /&gt;
DBforBIX support the following databases:&lt;br /&gt;
* Oracle&lt;br /&gt;
* MySQL Server&lt;br /&gt;
* PostgreSQL&lt;br /&gt;
* MS SQL Server&lt;br /&gt;
* DB2&lt;br /&gt;
&lt;br /&gt;
All information gathered from the monitored databases is retrieved by query, using the Java JDBC layer. This ensures compatibility and diversity with future database versions and types.&lt;br /&gt;
&lt;br /&gt;
===Monitoring Capabilities===&lt;br /&gt;
Below are some examples of what DBforBIX is capable of monitoring.&lt;br /&gt;
&lt;br /&gt;
on Oracle Database&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Oracle:&lt;br /&gt;
&lt;br /&gt;
Availability&lt;br /&gt;
* DB Version (for every vendor)&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages,&lt;br /&gt;
* Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize) on MySQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on MySQL.&lt;br /&gt;
The list was truncated due to the sheer volume of list items:&lt;br /&gt;
&lt;br /&gt;
* Dbversion&lt;br /&gt;
* table/thread cache&lt;br /&gt;
* Com created/dropped/changed/committed&lt;br /&gt;
* Innodb statistics&lt;br /&gt;
* Key read/write/requests&lt;br /&gt;
* Qcache statistics&lt;br /&gt;
&lt;br /&gt;
on PostgreSQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on PostgreSQL:&lt;br /&gt;
&lt;br /&gt;
* Availability&lt;br /&gt;
* Buffers (Backend, checkpoint, clean, allocated)&lt;br /&gt;
* Checkpoint (requested, timed)&lt;br /&gt;
* Connections&lt;br /&gt;
* Tuples (deleted, updated, fetched, returned, inserted)&lt;br /&gt;
* Xact (rollback, commit)&lt;br /&gt;
* Locks (every kind of  exclusive locks and every kind of general locks)&lt;br /&gt;
&lt;br /&gt;
on MS SQL server&lt;br /&gt;
The following are just some of parameters that DBforBIX is capable of monitoring on Microsoft SQL Server:&lt;br /&gt;
* Cachehit&lt;br /&gt;
* I/O Pending&lt;br /&gt;
* waittime&lt;br /&gt;
* dbsize/logsize&lt;br /&gt;
* log usedsize&lt;br /&gt;
* Page reades/writes&lt;br /&gt;
&lt;br /&gt;
On DB2&lt;br /&gt;
Coming soon to a DBforBIX distribution near you!&lt;br /&gt;
==Distribution==&lt;br /&gt;
You can find the latest versions of DBforBIX locations listed below:&lt;br /&gt;
* http://www.smartmarmot.com/product/dbforbix/download/&lt;br /&gt;
or&lt;br /&gt;
* https://sourceforge.net/projects/dbforbix/&lt;br /&gt;
&lt;br /&gt;
==Technical Details==&lt;br /&gt;
DBforBIX has been made to monitor and control every kind of principal database with just one daemon.&lt;br /&gt;
&lt;br /&gt;
Points of force of this daemon are:&lt;br /&gt;
* Apache DBCP connection pool&lt;br /&gt;
* logging realized by Log4J&lt;br /&gt;
* Hyper Threading&lt;br /&gt;
* Superscalar (you can monitor a huge amount of databases of different kind)&lt;br /&gt;
* Refresh parameter while running (you don&amp;#039;t need to restart the daemon)&lt;br /&gt;
* unlimited support of Zabbix servers (send the retrieved items to all Zabbix server&lt;br /&gt;
* Items collision free&lt;br /&gt;
&lt;br /&gt;
Pros:&lt;br /&gt;
You can customize connection pooling for each database with different parameters. &lt;br /&gt;
This means  that  connections are reused (constantly making a new connection introduces an overhead for all databases) and when idle or dropped.&lt;br /&gt;
You can customize your logfile format as you see fit, so it can be parsed to/from your own software to maintain control of information gathered by DBforBIX logging and assist in error troubleshooting.&lt;br /&gt;
Hyper Threading: If a database is slow, it won’t impact your other databases as every job is a thread and all generated threads run independently.&lt;br /&gt;
DBforBIX can scale on multiple processors and is really lightweight.&lt;br /&gt;
You can definitively use it in your mission critical environment, since the architecture allows you to send all retrieved items to any number of Zabbix servers, without limitations.&lt;br /&gt;
All the Items retrieved are collision free.&lt;br /&gt;
e.g. Alive is a true &amp;#039;&amp;#039;common&amp;#039;&amp;#039; item that can have collision with another Item with the same name.&lt;br /&gt;
&lt;br /&gt;
Here is an example of the collision problem, solved by DBforBIX automatically introducing a prefix that is always in the form of:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;DBforBIX.&amp;lt;db type&amp;gt;.itemkey&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dbtype&amp;gt; can be Oracle, MySQL, PostgreSQL, DB2, MSSQL and are predefined (you don&amp;#039;t need to configure  or modify anything)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use DBforBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
* DBforBIX distribution binaries&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested DBforBIX host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 9i&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
* 11G&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
* 9.0&lt;br /&gt;
&lt;br /&gt;
Currently known tested MySQL Versions:&lt;br /&gt;
* 5.x&lt;br /&gt;
&lt;br /&gt;
Currently known tested SQLServer Versions:&lt;br /&gt;
* 2005&lt;br /&gt;
* 2000&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do NOT need to install any client of any kind for DBforBIX to work.&lt;br /&gt;
You need to download and place under /lib/ directory the following library:&lt;br /&gt;
db2jcc_license_cu.jar&lt;br /&gt;
db2jcc.jar&lt;br /&gt;
ojdbc6.jar&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIX uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require any database client to be installed on your Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
===Generated Graphs===&lt;br /&gt;
There are a significant number of graphs generated by the default templates included in DBforBIX, for each kind of database.&lt;br /&gt;
&lt;br /&gt;
Some examples are coming soon.&lt;br /&gt;
&lt;br /&gt;
==Installation==&lt;br /&gt;
===Assumptions===&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x database Server. If you are planning on monitoring a database instance that is running on your Zabbix Server, the steps are the same,with minor adjustments required for your connection information. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring DBforBIX to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access as required. Consult your DBA for details, as this is beyond the scope of these instructions. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Common (Universal) Installation Steps===&lt;br /&gt;
Download DBforBIX to your Zabbix Server&lt;br /&gt;
On your Zabbix server, unzip DBforBIX to: /opt/dbforbix&lt;br /&gt;
Copy file /opt/dbforbix/init.d/dbforbix to /etc/init.d/dbforbix&lt;br /&gt;
Grant execute permissions to the following files:&lt;br /&gt;
* /etc/init.d/dbforbix&lt;br /&gt;
* /opt/dbforbix/run.sh&lt;br /&gt;
For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add dbforbix&lt;br /&gt;
Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import your needed templates found at: &lt;br /&gt;
  /opt/dbforbix/template&lt;br /&gt;
&lt;br /&gt;
===Installation on Windows===&lt;br /&gt;
DBforBIX implements an Apache daemon and offers the capability to run as a service on Microsoft Windows environments.&lt;br /&gt;
&lt;br /&gt;
Install DBforBIX on Windows is really easy just follow these steps:&lt;br /&gt;
* Create a directory on c: called dbforbix&lt;br /&gt;
* extract the distribution inside “c:\dbforbix”&lt;br /&gt;
* double click on “install.cmd”&lt;br /&gt;
after you&amp;#039;ll find a service called “DBforBIX Universal Database Monitor for Zabbix”&lt;br /&gt;
&lt;br /&gt;
You can use “dbforbixw.exe” to customize service&amp;#039;s parameters if required.&lt;br /&gt;
Refer Figures 1.a and 1.b for screenshots that show dbforbixw.exe at work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Dbforbix 01.JPG|frame|none|alt=DBforBIX General|Fig. 2 - DBforBIX General]]&lt;br /&gt;
[[Image:Dbforbix 02.JPG|frame|none|alt=DBforBIX Logging|Fig. 3 - DBforBIX Logging]]&lt;br /&gt;
[[Image:Dbforbix 03.JPG|frame|none|alt=DBforBIX Java|Fig. 4 - DBforBIX Java]]&lt;br /&gt;
[[Image:Dbforbix 04.JPG|frame|none|alt=DBforBIX Startup|Fig. 5 - DBforBIX Startup]]&lt;br /&gt;
[[Image:Dbforbix 05.JPG|frame|none|alt=DBforBIX Shutdown|Fig. 6 - DBforBIX Shutdown]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install steps for Oracle&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your Oracle Database. You can use the following script:&lt;br /&gt;
   CREATE USER ZABBIX&lt;br /&gt;
   IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
   DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
   TEMPORARY TABLESPACE TEMP&lt;br /&gt;
   PROFILE DEFAULT&lt;br /&gt;
   ACCOUNT UNLOCK;&lt;br /&gt;
   -– 2 Roles for ZABBIX&lt;br /&gt;
   GRANT CONNECT TO ZABBIX;&lt;br /&gt;
   GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
   ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
   –- 5 System Privileges for ZABBIX&lt;br /&gt;
   GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
   GRANT CREATE SESSION TO ZABBIX;	&lt;br /&gt;
   GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
   GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE :&amp;#039;&amp;#039;&amp;#039; If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
   exec dbms_network_acl_admin.create_acl(acl =&amp;gt; ‘resolve.xml’,description =&amp;gt; ‘resolve acl‘, principal =&amp;gt;’ZABBIX’,is_grant =&amp;gt; true, privilege =&amp;gt; ‘resolve’);&lt;br /&gt;
   exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; ‘resolve.xml’, host =&amp;gt;’*&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
&lt;br /&gt;
   select utl_inaddr.get_host_name(’127.0.0.1′) from dual;&lt;br /&gt;
&lt;br /&gt;
===Install steps for PostgreSQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your PostgreSQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
   GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on MySQL===&lt;br /&gt;
Create a User (ZABBIX) for DBforBIX to access your MySQL Database.&amp;lt;br&amp;gt; &lt;br /&gt;
You can use the following script:   &lt;br /&gt;
   CREATE USER &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039; IDENTIFIED BY &amp;#039;zabbixpassword&amp;#039;;&lt;br /&gt;
   GRANT SELECT, SHOW VIEW ON *.* TO &amp;#039;zabbix_monitor&amp;#039;@&amp;#039;%.mydomain.com&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on Microsoft SQL Server===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
===Steps for Installation on IBM DB2===&lt;br /&gt;
Coming soon&lt;br /&gt;
&lt;br /&gt;
==Configuration==&lt;br /&gt;
Now we need to configure your DBforBIX setup. &lt;br /&gt;
&lt;br /&gt;
The tags below are listed as they will appear within the respective configuration files. &lt;br /&gt;
The first you will need to modify is your config.props file to define your connection properties for Zabbix and your databases.&lt;br /&gt;
&lt;br /&gt;
The config.props file can be found at /opt/dbforbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
===Config.props===&lt;br /&gt;
The file  which is included in DBforBIX distribution if is the first installation need be renamed removing “.sample”.&lt;br /&gt;
With this way you will never find out overwritten your configurations file updating DBforBIX with a new release.&lt;br /&gt;
  ZabbixServerList&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
DBforBIX can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
  ZabbixServerList=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  ZabbixServer1.Address=192.168.0.1&lt;br /&gt;
  ZabbixServer1.Port=10051&lt;br /&gt;
  ZabbixServer2.Address=192.168.0.2&lt;br /&gt;
  ZabbixServer2.Port=10051&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DBforBIXDaemon&lt;br /&gt;
Entries under this tag allow you to set your DBforBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
 #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the DBforBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by DB, now this parameter&lt;br /&gt;
&lt;br /&gt;
if not set is automatically calculated.&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
  DBforBIX.MaxThreadNumber=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/dbforbix/logs&lt;br /&gt;
  DBforBIX.PidFile=./logs/dbforbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  DatabaseList&lt;br /&gt;
Entries under this heading allow you to configure your database list information:&lt;br /&gt;
  #put here your databases in a comma separated list&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
  DatabaseList=EXAMPLE1,...&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: &lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;The names of the instances must match those you have specified as your HOST name in Zabbix&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, DBforBIX will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
DatabaseList.MaxWait=100&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as: DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information .&lt;br /&gt;
&lt;br /&gt;
EXAMPLE1.Url=write here your database Url should be in the form:&lt;br /&gt;
  Oracle	=	jdbc:oracle:thin:@&amp;lt;host&amp;gt;:&amp;lt;LISTENER_PORT&amp;gt;:&amp;lt;instance&amp;gt;&lt;br /&gt;
  PostgreSQL	=	jdbc:postgresql://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;database&amp;gt;&lt;br /&gt;
  MS Sql Server	=	jdbc:jtds:sqlserver://&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;instancename&amp;gt;&lt;br /&gt;
  MySQL Server	=	jdbc:mysql://[host:port],[host:port].../[database]&lt;br /&gt;
  DB2		=	jdbc:db2://&amp;lt;servername&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;installation&amp;gt;&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
  EXAMPLE1.DatabaseType=&amp;lt;databasetype&amp;gt;&lt;br /&gt;
where &amp;lt;databasetype&amp;gt; can be = [oracle]|[pgsql]|[mssql]|[mysql]|[db2]&lt;br /&gt;
it depend from your database&lt;br /&gt;
  EXAMPLE1.QueryListFile=&amp;lt;path to query file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Query List File&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the databases specific queries (SQL) queries can be found. This is a customizable file.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to specify the query parameter file:&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props &lt;br /&gt;
This entry will specify the query file of a database relative path are allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Most common query files are included in DBforBIX distribution you need to rename and remove “.sample”&lt;br /&gt;
&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customized queries through DBforBIX against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Item names must be unique. The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
  #QueryList&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  #Query&lt;br /&gt;
You must identify the query by the unique item name you specified in the&lt;br /&gt;
QueryList, followed by &amp;#039;.Query&amp;#039; for DBforBIX to recognise that this is the query string.&lt;br /&gt;
It’s important to remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
Now you can define what you want DBforBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
Next you can specify a query that will be executed and if return ‘RaceConditionValue’ the query ‘customQueryItemName’ is executed, otherwise it is skipped&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] &lt;br /&gt;
if true query is executed otherwise skipped&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT COUNT (*) LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
    FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
    ( SELECT Avg(BYTES) AVG, Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes \&lt;br /&gt;
  FROM v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
&lt;br /&gt;
if true then add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
&lt;br /&gt;
==DBforBIX FAQ==&lt;br /&gt;
How do I start/stop the Daemon?&amp;lt;br&amp;gt;&lt;br /&gt;
To start the DBforBIX Daemon, run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/dbforbix start&lt;br /&gt;
&lt;br /&gt;
To stop the DBforBIX Daemon, run:&lt;br /&gt;
  /etc/init.d/dbforbix stop&lt;br /&gt;
&lt;br /&gt;
How does Logging work?&lt;br /&gt;
The DBforBIX daemon outputs its log file to the default location of /opt/dbforbix/logs/&lt;br /&gt;
Logging properties can be modified by making your required changes to:&lt;br /&gt;
  /opt/dbforbix/conf/log4j.properties&lt;br /&gt;
The property setting responsible for defining the output location is:&lt;br /&gt;
  log4j.appender.DBforBIX.File=logs/dbforbix.log&lt;br /&gt;
&lt;br /&gt;
Is there a way for DBforBIX to monitor RAC or DataGuard?&lt;br /&gt;
Yes is possible, for example;&lt;br /&gt;
If you have two hosts, RAC1 and RAC2, in one instance of RACINST&lt;br /&gt;
you should write the connection string as follow:&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
What can I modify without restarting the daemon?&lt;br /&gt;
The parameters that are dynamically read at each iteration of “DBforBIXDaemon.Sleep” are as follows;&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the&lt;br /&gt;
ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
Is it possible divide monitoring for based on database type and/or environment?&lt;br /&gt;
Yes it&amp;#039;s possible and it&amp;#039;s easy! Basically, you just need to copy your installation directory into a new one&lt;br /&gt;
e.g. you can have&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
and then you need to copy /etc/init.d/dbforbix into&lt;br /&gt;
  /etc/init.d/dbforbix_prod&lt;br /&gt;
  /etc/init.d/dbforbix_test&lt;br /&gt;
  /etc/init.d/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
After this, you need to customize start/stop script to locate the right directory for each instance of DBforBIX&lt;br /&gt;
e.g.&lt;br /&gt;
  dbforbix=/opt/dbforbix&lt;br /&gt;
should be changed into:&lt;br /&gt;
  /opt/dbforbix_prod&lt;br /&gt;
  /opt/dbforbix_test&lt;br /&gt;
  /opt/dbforbix_devel&lt;br /&gt;
&lt;br /&gt;
Now you have completely divided your monitoring solution to the most common scenarios of:&lt;br /&gt;
development environment&lt;br /&gt;
test/quality/pre-production environment&lt;br /&gt;
production environment&lt;br /&gt;
&lt;br /&gt;
After that you can customize your queries file for you different environments, ensure each fulfils the requirements based on their varying needs. You can play around with the suggestions above and do the same as needed.&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
==Document Copyright==&lt;br /&gt;
Document Copyright © Andrea Dalle Vacche and Jason Chatfield&lt;br /&gt;
&lt;br /&gt;
==License Information==&lt;br /&gt;
[[Image:DBforBIX.png|left|link=DBforBIX]]&lt;br /&gt;
DBforBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE &amp;lt;br&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Version 3, 29 June 2007 &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=177</id>
		<title>Orabbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=177"/>
				<updated>2012-02-16T14:51:35Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Steps for Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;ORABBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:orabbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;About Orabbix&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
Orabbix is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for Oracle Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous Oracle instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Orabbix_architecture.png|frame|none|alt=Orabbix Architecture|Fig. 1 - Orabbix Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what Orabbix is capable of monitoring:&lt;br /&gt;
* DB Version (i.e. Validity of package)&amp;lt;br&amp;gt;&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&amp;lt;br&amp;gt;&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages, Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize)&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_ARCHIVELOG.png|frame|none|alt=Orabbix Archivelog|Fig. 2 - Orabbix Archivelog]]&lt;br /&gt;
[[Image:Orabbix_DBSIZEFILESIZE.png|frame|none|alt=Orabbix DBFileSize|Fig. 3 - Orabbix DBFileSize]]&lt;br /&gt;
[[Image:Orabbix_EVENTWAITS.png|frame|none|alt=Orabbix Events Waits|Fig. 4 - Orabbix Events Waits]]&lt;br /&gt;
[[Image:Orabbix_SHAREDPOOL.png|frame|none|alt=Orabbix Shared Pool|Fig. 5 - Orabbix SHared Pool]]&lt;br /&gt;
[[Image:Orabbix_SGA.png|frame|none|alt=Orabbix SGA|Fig. 6 - Orabbix SGA]]&lt;br /&gt;
[[Image:Orabbix_PINHITRATIO.png|frame|none|alt=Orabbix Pin Hit Ratio|Fig. 7 - Orabbix Pin Hit Ratio]]&lt;br /&gt;
[[Image:Orabbix_SESSIONS.png|frame|none|alt=Orabbix Sessions|Fig. 8 - Orabbix Sessions]]&lt;br /&gt;
[[Image:Orabbix_SESSIONPROCESS.png|frame|none|alt=Orabbix Sessions Processes|Fig. 9 - Orabbix Sessions Processes]]&lt;br /&gt;
[[Image:Orabbix_PGA.png|frame|none|alt=Orabbix PGA|Fig. 10 - PGA]]&lt;br /&gt;
[[Image:Orabbix_LIO.png|frame|none|alt=Orabbix Logical I/O|Fig. 11 - Logical I/O]]&lt;br /&gt;
[[Image:Orabbix_PHIO.png|frame|none|alt=Orabbix Physical I/O|Fig. 12 - Physical I/O]]&lt;br /&gt;
&lt;br /&gt;
==Orabbix Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the Orabbix plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666 &amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of Orabbix at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use Orabbix, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested Oracle host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an Oracle client of any kind for Orabbix to work.&lt;br /&gt;
  Orabbix uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require an Oracle client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x Oracle Server. If you are planning on monitoring an Oracle instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring Orabbix to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download Orabbix to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip Orabbix to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for Orabbix to access your Oracle Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; if you need an User (ZABBIX) for Orabbix with the minimum grants available, you can use the following script:&lt;br /&gt;
&lt;br /&gt;
 CREATE USER ZABBIX&lt;br /&gt;
 IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
 DEFAULT TABLESPACE USERS&lt;br /&gt;
 TEMPORARY TABLESPACE TEMP&lt;br /&gt;
 PROFILE DEFAULT&lt;br /&gt;
 ACCOUNT UNLOCK;&lt;br /&gt;
 GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CONNECT TO ZABBIX;&lt;br /&gt;
 ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
 GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or Oracle instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your Orabbix setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and Oracle.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
Orabbix can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating Orabbix data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===OrabbixDaemon===&lt;br /&gt;
Entries under this tag allow you to set your Orabbix Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the Orabbix Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by Orabbix, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the Orabbix Daemon, it is possible to clone Orabbix and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, Orabbix  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the Oracle (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; Oracle Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through Orabbix against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for Orabbix to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want Orabbix to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, Orabbix would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, Orabbix would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use Orabbix/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The Orabbix daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.Orabbix.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “OrabbixDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
Orabbix is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=176</id>
		<title>Orabbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=176"/>
				<updated>2012-02-16T14:50:54Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Steps for Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;ORABBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:orabbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;About Orabbix&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
Orabbix is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for Oracle Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous Oracle instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Orabbix_architecture.png|frame|none|alt=Orabbix Architecture|Fig. 1 - Orabbix Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what Orabbix is capable of monitoring:&lt;br /&gt;
* DB Version (i.e. Validity of package)&amp;lt;br&amp;gt;&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&amp;lt;br&amp;gt;&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages, Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize)&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_ARCHIVELOG.png|frame|none|alt=Orabbix Archivelog|Fig. 2 - Orabbix Archivelog]]&lt;br /&gt;
[[Image:Orabbix_DBSIZEFILESIZE.png|frame|none|alt=Orabbix DBFileSize|Fig. 3 - Orabbix DBFileSize]]&lt;br /&gt;
[[Image:Orabbix_EVENTWAITS.png|frame|none|alt=Orabbix Events Waits|Fig. 4 - Orabbix Events Waits]]&lt;br /&gt;
[[Image:Orabbix_SHAREDPOOL.png|frame|none|alt=Orabbix Shared Pool|Fig. 5 - Orabbix SHared Pool]]&lt;br /&gt;
[[Image:Orabbix_SGA.png|frame|none|alt=Orabbix SGA|Fig. 6 - Orabbix SGA]]&lt;br /&gt;
[[Image:Orabbix_PINHITRATIO.png|frame|none|alt=Orabbix Pin Hit Ratio|Fig. 7 - Orabbix Pin Hit Ratio]]&lt;br /&gt;
[[Image:Orabbix_SESSIONS.png|frame|none|alt=Orabbix Sessions|Fig. 8 - Orabbix Sessions]]&lt;br /&gt;
[[Image:Orabbix_SESSIONPROCESS.png|frame|none|alt=Orabbix Sessions Processes|Fig. 9 - Orabbix Sessions Processes]]&lt;br /&gt;
[[Image:Orabbix_PGA.png|frame|none|alt=Orabbix PGA|Fig. 10 - PGA]]&lt;br /&gt;
[[Image:Orabbix_LIO.png|frame|none|alt=Orabbix Logical I/O|Fig. 11 - Logical I/O]]&lt;br /&gt;
[[Image:Orabbix_PHIO.png|frame|none|alt=Orabbix Physical I/O|Fig. 12 - Physical I/O]]&lt;br /&gt;
&lt;br /&gt;
==Orabbix Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the Orabbix plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666 &amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of Orabbix at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use Orabbix, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested Oracle host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an Oracle client of any kind for Orabbix to work.&lt;br /&gt;
  Orabbix uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require an Oracle client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x Oracle Server. If you are planning on monitoring an Oracle instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring Orabbix to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download Orabbix to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip Orabbix to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for Orabbix to access your Oracle Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; if you need an User (ZABBIX) for Orabbix with the minimum grants available. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
 CREATE USER ZABBIX&lt;br /&gt;
 IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
 DEFAULT TABLESPACE USERS&lt;br /&gt;
 TEMPORARY TABLESPACE TEMP&lt;br /&gt;
 PROFILE DEFAULT&lt;br /&gt;
 ACCOUNT UNLOCK;&lt;br /&gt;
 GRANT ALTER SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
 GRANT CONNECT TO ZABBIX;&lt;br /&gt;
 ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
 GRANT SELECT ON V_$INSTANCE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_USERS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOG_HISTORY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON SYS.DBA_AUDIT_SESSION TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LOCK TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_REGISTRY TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSSTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PARAMETER TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LATCH TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SGASTAT TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$LIBRARYCACHE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$PROCESS TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_DATA_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_TEMP_FILES TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON DBA_FREE_SPACE TO ZABBIX;&lt;br /&gt;
 GRANT SELECT ON V_$SYSTEM_EVENT TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or Oracle instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your Orabbix setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and Oracle.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
Orabbix can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating Orabbix data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===OrabbixDaemon===&lt;br /&gt;
Entries under this tag allow you to set your Orabbix Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the Orabbix Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by Orabbix, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the Orabbix Daemon, it is possible to clone Orabbix and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, Orabbix  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the Oracle (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; Oracle Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through Orabbix against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for Orabbix to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want Orabbix to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, Orabbix would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, Orabbix would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use Orabbix/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The Orabbix daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.Orabbix.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “OrabbixDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
Orabbix is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=175</id>
		<title>File:Postbix logo.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=175"/>
				<updated>2011-11-02T14:25:57Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: uploaded a new version of &amp;amp;quot;File:Postbix logo.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=174</id>
		<title>File:Postbix logo.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=174"/>
				<updated>2011-11-02T12:12:22Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: uploaded a new version of &amp;amp;quot;File:Postbix logo.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=173</id>
		<title>File:Postbix logo.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=173"/>
				<updated>2011-11-02T12:11:04Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: uploaded a new version of &amp;amp;quot;File:Postbix logo.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=172</id>
		<title>File:Postbix logo.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=172"/>
				<updated>2011-11-02T12:09:34Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: uploaded a new version of &amp;amp;quot;File:Postbix logo.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=171</id>
		<title>File:Postbix logo.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=171"/>
				<updated>2011-11-02T11:48:32Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: uploaded a new version of &amp;amp;quot;File:Postbix logo.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=170</id>
		<title>Postbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=170"/>
				<updated>2011-10-31T15:06:35Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Steps for Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;POSTBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:postbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;About PostBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
PostBIX is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for PostgreSQL Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous PostgreSQL instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PostBIX_architecture.png|frame|none|alt=PostBIX Architecture|Fig. 1 - PostBIX Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what PostBIX is capable of monitoring:&lt;br /&gt;
*comming soon&lt;br /&gt;
&lt;br /&gt;
[[Image:PostBIX_ALIVE.png|frame|none|alt=PostBIX Alive|Fig. 2 - PostBIX Alive]]&lt;br /&gt;
[[Image:PostBIX_BUFFERS.png|frame|none|alt=PostBIX BUFFERS|Fig. 3 - PostBIX Buffers]]&lt;br /&gt;
[[Image:PostBIX_CHECKPOINT.png|frame|none|alt=PostBIX CHECKPOINT|Fig. 4 - PostBIX Checkpoint]]&lt;br /&gt;
[[Image:PostBIX_XACT.png|frame|none|alt=PostBIX XACT|Fig. 5 - PostBIX XACT]]&lt;br /&gt;
[[Image:PostBIX_CONNECTIONS.png|frame|none|alt=PostBIX Connections|Fig. 6 - PostBIX SGA]]&lt;br /&gt;
[[Image:PostBIX_TUPLES.png|frame|none|alt=PostBIX Tuples|Fig. 7 - PostBIX Tuple]]&lt;br /&gt;
[[Image:PostBIX_LOCKS.png|frame|none|alt=PostBIX Locks|Fig. 8 - PostBIX Locks]]&lt;br /&gt;
&lt;br /&gt;
==PostBIX Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the PostBIX plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=18690 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of PostBIX at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/postbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/postbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use PostBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested PostgreSQL host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an PostgreSQL client of any kind for PostBIX to work.&lt;br /&gt;
  PostBIX uses Java objects and connection strings to connect to the PostgreSQL Database, and as such doesn’t require an PostgreSQL client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x PostgreSQL Server. If you are planning on monitoring an PostgreSQL instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring PostBIX to monitor a new installation or setup of PostgreSQL. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download PostBIX to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip PostBIX to:  /opt/postbix&lt;br /&gt;
* Copy file /opt/postbix/init.d/postbixto /etc/init.d/postbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/postbix&lt;br /&gt;
  /opt/postbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for PostBIX to access your PostgreSQL Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
  GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add postbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/postbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or PostgreSQL instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your PostBIX setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
PostBIX can also be configured to send your PostgreSQL data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating PostBIX data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===PostBIXDaemon===&lt;br /&gt;
Entries under this tag allow you to set your PostBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the PostBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by PostBIX, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the PostBIX Daemon, it is possible to clone PostBIX and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, PostBIX  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the PostgreSQL Database. This string invokes a Java Database Connector (JDBC) to your PostgreSQL Databases, and as such does not need the PostgreSQL Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the PostgreSQL (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; PostgreSQL Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through PostBIX against your PostgreSQL instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for PostBIX to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want PostBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, PostBIX would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, PostBIX would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use PostBIX/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The PostBIX daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.PostBIX.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “PostBIXDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
PostBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=169</id>
		<title>Postbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=169"/>
				<updated>2011-10-31T15:06:14Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Steps for Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;POSTBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:postbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;About PostBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
PostBIX is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for PostgreSQL Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous PostgreSQL instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PostBIX_architecture.png|frame|none|alt=PostBIX Architecture|Fig. 1 - PostBIX Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what PostBIX is capable of monitoring:&lt;br /&gt;
*comming soon&lt;br /&gt;
&lt;br /&gt;
[[Image:PostBIX_ALIVE.png|frame|none|alt=PostBIX Alive|Fig. 2 - PostBIX Alive]]&lt;br /&gt;
[[Image:PostBIX_BUFFERS.png|frame|none|alt=PostBIX BUFFERS|Fig. 3 - PostBIX Buffers]]&lt;br /&gt;
[[Image:PostBIX_CHECKPOINT.png|frame|none|alt=PostBIX CHECKPOINT|Fig. 4 - PostBIX Checkpoint]]&lt;br /&gt;
[[Image:PostBIX_XACT.png|frame|none|alt=PostBIX XACT|Fig. 5 - PostBIX XACT]]&lt;br /&gt;
[[Image:PostBIX_CONNECTIONS.png|frame|none|alt=PostBIX Connections|Fig. 6 - PostBIX SGA]]&lt;br /&gt;
[[Image:PostBIX_TUPLES.png|frame|none|alt=PostBIX Tuples|Fig. 7 - PostBIX Tuple]]&lt;br /&gt;
[[Image:PostBIX_LOCKS.png|frame|none|alt=PostBIX Locks|Fig. 8 - PostBIX Locks]]&lt;br /&gt;
&lt;br /&gt;
==PostBIX Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the PostBIX plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=18690 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of PostBIX at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/postbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/postbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use PostBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested PostgreSQL host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an PostgreSQL client of any kind for PostBIX to work.&lt;br /&gt;
  PostBIX uses Java objects and connection strings to connect to the PostgreSQL Database, and as such doesn’t require an PostgreSQL client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x PostgreSQL Server. If you are planning on monitoring an PostgreSQL instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring PostBIX to monitor a new installation or setup of PostgreSQL. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download PostBIX to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip PostBIX to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for PostBIX to access your PostgreSQL Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER zabbix WITH PASSWORD &amp;#039;passw0rd&amp;#039;;&lt;br /&gt;
  GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_stat_activity to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_database to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_authid to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_stat_bgwriter to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_locks to zabbix;&lt;br /&gt;
  GRANT SELECT ON pg_stat_database to zabbix;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add postbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/postbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or PostgreSQL instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your PostBIX setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
PostBIX can also be configured to send your PostgreSQL data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating PostBIX data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===PostBIXDaemon===&lt;br /&gt;
Entries under this tag allow you to set your PostBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the PostBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by PostBIX, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the PostBIX Daemon, it is possible to clone PostBIX and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, PostBIX  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the PostgreSQL Database. This string invokes a Java Database Connector (JDBC) to your PostgreSQL Databases, and as such does not need the PostgreSQL Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the PostgreSQL (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; PostgreSQL Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through PostBIX against your PostgreSQL instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for PostBIX to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want PostBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, PostBIX would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, PostBIX would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use PostBIX/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The PostBIX daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.PostBIX.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “PostBIXDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
PostBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=168</id>
		<title>Postbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=168"/>
				<updated>2011-10-31T15:05:01Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;POSTBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:postbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;About PostBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
PostBIX is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for PostgreSQL Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous PostgreSQL instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PostBIX_architecture.png|frame|none|alt=PostBIX Architecture|Fig. 1 - PostBIX Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what PostBIX is capable of monitoring:&lt;br /&gt;
*comming soon&lt;br /&gt;
&lt;br /&gt;
[[Image:PostBIX_ALIVE.png|frame|none|alt=PostBIX Alive|Fig. 2 - PostBIX Alive]]&lt;br /&gt;
[[Image:PostBIX_BUFFERS.png|frame|none|alt=PostBIX BUFFERS|Fig. 3 - PostBIX Buffers]]&lt;br /&gt;
[[Image:PostBIX_CHECKPOINT.png|frame|none|alt=PostBIX CHECKPOINT|Fig. 4 - PostBIX Checkpoint]]&lt;br /&gt;
[[Image:PostBIX_XACT.png|frame|none|alt=PostBIX XACT|Fig. 5 - PostBIX XACT]]&lt;br /&gt;
[[Image:PostBIX_CONNECTIONS.png|frame|none|alt=PostBIX Connections|Fig. 6 - PostBIX SGA]]&lt;br /&gt;
[[Image:PostBIX_TUPLES.png|frame|none|alt=PostBIX Tuples|Fig. 7 - PostBIX Tuple]]&lt;br /&gt;
[[Image:PostBIX_LOCKS.png|frame|none|alt=PostBIX Locks|Fig. 8 - PostBIX Locks]]&lt;br /&gt;
&lt;br /&gt;
==PostBIX Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the PostBIX plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=18690 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of PostBIX at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/postbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/postbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use PostBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested PostgreSQL host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 8.3&lt;br /&gt;
* 8.4&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an PostgreSQL client of any kind for PostBIX to work.&lt;br /&gt;
  PostBIX uses Java objects and connection strings to connect to the PostgreSQL Database, and as such doesn’t require an PostgreSQL client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x PostgreSQL Server. If you are planning on monitoring an PostgreSQL instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring PostBIX to monitor a new installation or setup of PostgreSQL. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download PostBIX to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip PostBIX to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for PostBIX to access your PostgreSQL Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using PostgreSQL 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or PostgreSQL instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your PostBIX setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
PostBIX can also be configured to send your PostgreSQL data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating PostBIX data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===PostBIXDaemon===&lt;br /&gt;
Entries under this tag allow you to set your PostBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the PostBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by PostBIX, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the PostBIX Daemon, it is possible to clone PostBIX and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, PostBIX  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the PostgreSQL Database. This string invokes a Java Database Connector (JDBC) to your PostgreSQL Databases, and as such does not need the PostgreSQL Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the PostgreSQL (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; PostgreSQL Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through PostBIX against your PostgreSQL instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for PostBIX to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want PostBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, PostBIX would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, PostBIX would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use PostBIX/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The PostBIX daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.PostBIX.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “PostBIXDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
PostBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=167</id>
		<title>Postbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=167"/>
				<updated>2011-10-31T15:04:37Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* Distribution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;POSTBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:postbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;About PostBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
PostBIX is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for PostgreSQL Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous PostgreSQL instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PostBIX_architecture.png|frame|none|alt=PostBIX Architecture|Fig. 1 - PostBIX Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what PostBIX is capable of monitoring:&lt;br /&gt;
*comming soon&lt;br /&gt;
&lt;br /&gt;
[[Image:PostBIX_ALIVE.png|frame|none|alt=PostBIX Alive|Fig. 2 - PostBIX Alive]]&lt;br /&gt;
[[Image:PostBIX_BUFFERS.png|frame|none|alt=PostBIX BUFFERS|Fig. 3 - PostBIX Buffers]]&lt;br /&gt;
[[Image:PostBIX_CHECKPOINT.png|frame|none|alt=PostBIX CHECKPOINT|Fig. 4 - PostBIX Checkpoint]]&lt;br /&gt;
[[Image:PostBIX_XACT.png|frame|none|alt=PostBIX XACT|Fig. 5 - PostBIX XACT]]&lt;br /&gt;
[[Image:PostBIX_CONNECTIONS.png|frame|none|alt=PostBIX Connections|Fig. 6 - PostBIX SGA]]&lt;br /&gt;
[[Image:PostBIX_TUPLES.png|frame|none|alt=PostBIX Tuples|Fig. 7 - PostBIX Tuple]]&lt;br /&gt;
[[Image:PostBIX_LOCKS.png|frame|none|alt=PostBIX Locks|Fig. 8 - PostBIX Locks]]&lt;br /&gt;
&lt;br /&gt;
==PostBIX Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the PostBIX plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=18690 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of PostBIX at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/postbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/postbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use PostBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested PostgreSQL host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an PostgreSQL client of any kind for PostBIX to work.&lt;br /&gt;
  PostBIX uses Java objects and connection strings to connect to the PostgreSQL Database, and as such doesn’t require an PostgreSQL client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x PostgreSQL Server. If you are planning on monitoring an PostgreSQL instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring PostBIX to monitor a new installation or setup of PostgreSQL. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download PostBIX to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip PostBIX to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for PostBIX to access your PostgreSQL Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using PostgreSQL 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or PostgreSQL instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your PostBIX setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
PostBIX can also be configured to send your PostgreSQL data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating PostBIX data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===PostBIXDaemon===&lt;br /&gt;
Entries under this tag allow you to set your PostBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the PostBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by PostBIX, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the PostBIX Daemon, it is possible to clone PostBIX and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, PostBIX  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the PostgreSQL Database. This string invokes a Java Database Connector (JDBC) to your PostgreSQL Databases, and as such does not need the PostgreSQL Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the PostgreSQL (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; PostgreSQL Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through PostBIX against your PostgreSQL instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for PostBIX to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want PostBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, PostBIX would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, PostBIX would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use PostBIX/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The PostBIX daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.PostBIX.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “PostBIXDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
PostBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=166</id>
		<title>Postbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=166"/>
				<updated>2011-10-31T15:04:22Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;POSTBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:postbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;About PostBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
PostBIX is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for PostgreSQL Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous PostgreSQL instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PostBIX_architecture.png|frame|none|alt=PostBIX Architecture|Fig. 1 - PostBIX Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what PostBIX is capable of monitoring:&lt;br /&gt;
*comming soon&lt;br /&gt;
&lt;br /&gt;
[[Image:PostBIX_ALIVE.png|frame|none|alt=PostBIX Alive|Fig. 2 - PostBIX Alive]]&lt;br /&gt;
[[Image:PostBIX_BUFFERS.png|frame|none|alt=PostBIX BUFFERS|Fig. 3 - PostBIX Buffers]]&lt;br /&gt;
[[Image:PostBIX_CHECKPOINT.png|frame|none|alt=PostBIX CHECKPOINT|Fig. 4 - PostBIX Checkpoint]]&lt;br /&gt;
[[Image:PostBIX_XACT.png|frame|none|alt=PostBIX XACT|Fig. 5 - PostBIX XACT]]&lt;br /&gt;
[[Image:PostBIX_CONNECTIONS.png|frame|none|alt=PostBIX Connections|Fig. 6 - PostBIX SGA]]&lt;br /&gt;
[[Image:PostBIX_TUPLES.png|frame|none|alt=PostBIX Tuples|Fig. 7 - PostBIX Tuple]]&lt;br /&gt;
[[Image:PostBIX_LOCKS.png|frame|none|alt=PostBIX Locks|Fig. 8 - PostBIX Locks]]&lt;br /&gt;
&lt;br /&gt;
==PostBIX Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the PostBIX plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=18690 &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of PostBIX at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use PostBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested PostgreSQL host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an PostgreSQL client of any kind for PostBIX to work.&lt;br /&gt;
  PostBIX uses Java objects and connection strings to connect to the PostgreSQL Database, and as such doesn’t require an PostgreSQL client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x PostgreSQL Server. If you are planning on monitoring an PostgreSQL instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring PostBIX to monitor a new installation or setup of PostgreSQL. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download PostBIX to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip PostBIX to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for PostBIX to access your PostgreSQL Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using PostgreSQL 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or PostgreSQL instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your PostBIX setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
PostBIX can also be configured to send your PostgreSQL data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating PostBIX data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===PostBIXDaemon===&lt;br /&gt;
Entries under this tag allow you to set your PostBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the PostBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by PostBIX, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the PostBIX Daemon, it is possible to clone PostBIX and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, PostBIX  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the PostgreSQL Database. This string invokes a Java Database Connector (JDBC) to your PostgreSQL Databases, and as such does not need the PostgreSQL Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the PostgreSQL (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; PostgreSQL Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through PostBIX against your PostgreSQL instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for PostBIX to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want PostBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, PostBIX would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, PostBIX would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use PostBIX/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The PostBIX daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.PostBIX.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “PostBIXDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
PostBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_LOCKS.png&amp;diff=165</id>
		<title>File:PostBIX LOCKS.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_LOCKS.png&amp;diff=165"/>
				<updated>2011-10-31T15:03:47Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_TUPLES.png&amp;diff=164</id>
		<title>File:PostBIX TUPLES.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_TUPLES.png&amp;diff=164"/>
				<updated>2011-10-31T15:03:41Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_CONNECTIONS.png&amp;diff=163</id>
		<title>File:PostBIX CONNECTIONS.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_CONNECTIONS.png&amp;diff=163"/>
				<updated>2011-10-31T15:03:29Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_XACT.png&amp;diff=162</id>
		<title>File:PostBIX XACT.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_XACT.png&amp;diff=162"/>
				<updated>2011-10-31T15:03:22Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_CHECKPOINT.png&amp;diff=161</id>
		<title>File:PostBIX CHECKPOINT.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_CHECKPOINT.png&amp;diff=161"/>
				<updated>2011-10-31T15:03:12Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_BUFFERS.png&amp;diff=160</id>
		<title>File:PostBIX BUFFERS.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_BUFFERS.png&amp;diff=160"/>
				<updated>2011-10-31T15:02:55Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_ALIVE.png&amp;diff=159</id>
		<title>File:PostBIX ALIVE.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:PostBIX_ALIVE.png&amp;diff=159"/>
				<updated>2011-10-31T15:02:08Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=158</id>
		<title>Postbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=158"/>
				<updated>2011-10-31T15:01:44Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* What can it monitor? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;POSTBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:postbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;About PostBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
PostBIX is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for PostgreSQL Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous PostgreSQL instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PostBIX_architecture.png|frame|none|alt=PostBIX Architecture|Fig. 1 - PostBIX Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what PostBIX is capable of monitoring:&lt;br /&gt;
*comming soon&lt;br /&gt;
&lt;br /&gt;
[[Image:PostBIX_ALIVE.png|frame|none|alt=PostBIX Alive|Fig. 2 - PostBIX Alive]]&lt;br /&gt;
[[Image:PostBIX_BUFFERS.png|frame|none|alt=PostBIX BUFFERS|Fig. 3 - PostBIX Buffers]]&lt;br /&gt;
[[Image:PostBIX_CHECKPOINT.png|frame|none|alt=PostBIX CHECKPOINT|Fig. 4 - PostBIX Checkpoint]]&lt;br /&gt;
[[Image:PostBIX_XACT.png|frame|none|alt=PostBIX XACT|Fig. 5 - PostBIX XACT]]&lt;br /&gt;
[[Image:PostBIX_CONNECTIONS.png|frame|none|alt=PostBIX Connections|Fig. 6 - PostBIX SGA]]&lt;br /&gt;
[[Image:PostBIX_TUPLES.png|frame|none|alt=PostBIX Tuples|Fig. 7 - PostBIX Tuple]]&lt;br /&gt;
[[Image:PostBIX_LOCKS.png|frame|none|alt=PostBIX Locks|Fig. 8 - PostBIX Locks]]&lt;br /&gt;
&lt;br /&gt;
==PostBIX Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the PostBIX plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666 &amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of PostBIX at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use PostBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested PostgreSQL host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an PostgreSQL client of any kind for PostBIX to work.&lt;br /&gt;
  PostBIX uses Java objects and connection strings to connect to the PostgreSQL Database, and as such doesn’t require an PostgreSQL client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x PostgreSQL Server. If you are planning on monitoring an PostgreSQL instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring PostBIX to monitor a new installation or setup of PostgreSQL. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download PostBIX to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip PostBIX to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for PostBIX to access your PostgreSQL Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using PostgreSQL 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or PostgreSQL instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your PostBIX setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
PostBIX can also be configured to send your PostgreSQL data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating PostBIX data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===PostBIXDaemon===&lt;br /&gt;
Entries under this tag allow you to set your PostBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the PostBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by PostBIX, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the PostBIX Daemon, it is possible to clone PostBIX and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, PostBIX  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the PostgreSQL Database. This string invokes a Java Database Connector (JDBC) to your PostgreSQL Databases, and as such does not need the PostgreSQL Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the PostgreSQL (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; PostgreSQL Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through PostBIX against your PostgreSQL instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for PostBIX to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want PostBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, PostBIX would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, PostBIX would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use PostBIX/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The PostBIX daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.PostBIX.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “PostBIXDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
PostBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Main_Page&amp;diff=157</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Main_Page&amp;diff=157"/>
				<updated>2011-10-31T14:58:23Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;SmartMarmot Wiki Pages.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:orabbix_logo.png|320px|link=Orabbix]] &amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:DBforBIX.png|320px|link=DBforBIX]]&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:postbix_logo.png|320px|link=PostBIX]]&amp;lt;br&amp;gt;&lt;br /&gt;
*[[mysqlbix |MySQLBIX]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=156</id>
		<title>File:Postbix logo.png</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=File:Postbix_logo.png&amp;diff=156"/>
				<updated>2011-10-31T14:57:11Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=155</id>
		<title>Postbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Postbix&amp;diff=155"/>
				<updated>2011-10-31T14:55:10Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: Created page with &amp;quot;=&amp;#039;&amp;#039;&amp;#039;POSTBIX&amp;#039;&amp;#039;&amp;#039;= File:postbix_logo.png =&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;= &amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt; &amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;  =&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=  =&amp;#039;&amp;#039;&amp;#039;About PostBIX&amp;#039;&amp;#039;&amp;#039;= ==...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;POSTBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:postbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;About PostBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
PostBIX is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for PostgreSQL Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous PostgreSQL instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PostBIX_architecture.png|frame|none|alt=PostBIX Architecture|Fig. 1 - PostBIX Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what PostBIX is capable of monitoring:&lt;br /&gt;
* DB Version (i.e. Validity of package)&amp;lt;br&amp;gt;&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&amp;lt;br&amp;gt;&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages, Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (PostgreSQL library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize)&lt;br /&gt;
&lt;br /&gt;
[[Image:PostBIX_ARCHIVELOG.png|frame|none|alt=PostBIX Archivelog|Fig. 2 - PostBIX Archivelog]]&lt;br /&gt;
[[Image:PostBIX_DBSIZEFILESIZE.png|frame|none|alt=PostBIX DBFileSize|Fig. 3 - PostBIX DBFileSize]]&lt;br /&gt;
[[Image:PostBIX_EVENTWAITS.png|frame|none|alt=PostBIX Events Waits|Fig. 4 - PostBIX Events Waits]]&lt;br /&gt;
[[Image:PostBIX_SHAREDPOOL.png|frame|none|alt=PostBIX Shared Pool|Fig. 5 - PostBIX SHared Pool]]&lt;br /&gt;
[[Image:PostBIX_SGA.png|frame|none|alt=PostBIX SGA|Fig. 6 - PostBIX SGA]]&lt;br /&gt;
[[Image:PostBIX_PINHITRATIO.png|frame|none|alt=PostBIX Pin Hit Ratio|Fig. 7 - PostBIX Pin Hit Ratio]]&lt;br /&gt;
[[Image:PostBIX_SESSIONS.png|frame|none|alt=PostBIX Sessions|Fig. 8 - PostBIX Sessions]]&lt;br /&gt;
[[Image:PostBIX_SESSIONPROCESS.png|frame|none|alt=PostBIX Sessions Processes|Fig. 9 - PostBIX Sessions Processes]]&lt;br /&gt;
[[Image:PostBIX_PGA.png|frame|none|alt=PostBIX PGA|Fig. 10 - PGA]]&lt;br /&gt;
[[Image:PostBIX_LIO.png|frame|none|alt=PostBIX Logical I/O|Fig. 11 - Logical I/O]]&lt;br /&gt;
[[Image:PostBIX_PHIO.png|frame|none|alt=PostBIX Physical I/O|Fig. 12 - Physical I/O]]&lt;br /&gt;
&lt;br /&gt;
==PostBIX Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the PostBIX plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666 &amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of PostBIX at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use PostBIX, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested PostgreSQL host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested PostgreSQL Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an PostgreSQL client of any kind for PostBIX to work.&lt;br /&gt;
  PostBIX uses Java objects and connection strings to connect to the PostgreSQL Database, and as such doesn’t require an PostgreSQL client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x PostgreSQL Server. If you are planning on monitoring an PostgreSQL instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring PostBIX to monitor a new installation or setup of PostgreSQL. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download PostBIX to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip PostBIX to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for PostBIX to access your PostgreSQL Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using PostgreSQL 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or PostgreSQL instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your PostBIX setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and PostgreSQL.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
PostBIX can also be configured to send your PostgreSQL data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating PostBIX data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===PostBIXDaemon===&lt;br /&gt;
Entries under this tag allow you to set your PostBIX Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the PostBIX Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by PostBIX, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PostBIXDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the PostBIX Daemon, it is possible to clone PostBIX and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, PostBIX  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the PostgreSQL Database. This string invokes a Java Database Connector (JDBC) to your PostgreSQL Databases, and as such does not need the PostgreSQL Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the PostgreSQL (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; PostgreSQL Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through PostBIX against your PostgreSQL instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for PostBIX to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want PostBIX to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, PostBIX would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, PostBIX would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use PostBIX/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the PostBIX Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The PostBIX daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.PostBIX.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “PostBIXDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
PostBIX is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=154</id>
		<title>Orabbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=154"/>
				<updated>2011-10-28T14:15:54Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* How to Use Orabbix/FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;ORABBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:orabbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;About Orabbix&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
Orabbix is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for Oracle Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous Oracle instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Orabbix_architecture.png|frame|none|alt=Orabbix Architecture|Fig. 1 - Orabbix Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what Orabbix is capable of monitoring:&lt;br /&gt;
* DB Version (i.e. Validity of package)&amp;lt;br&amp;gt;&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&amp;lt;br&amp;gt;&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages, Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize)&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_ARCHIVELOG.png|frame|none|alt=Orabbix Archivelog|Fig. 2 - Orabbix Archivelog]]&lt;br /&gt;
[[Image:Orabbix_DBSIZEFILESIZE.png|frame|none|alt=Orabbix DBFileSize|Fig. 3 - Orabbix DBFileSize]]&lt;br /&gt;
[[Image:Orabbix_EVENTWAITS.png|frame|none|alt=Orabbix Events Waits|Fig. 4 - Orabbix Events Waits]]&lt;br /&gt;
[[Image:Orabbix_SHAREDPOOL.png|frame|none|alt=Orabbix Shared Pool|Fig. 5 - Orabbix SHared Pool]]&lt;br /&gt;
[[Image:Orabbix_SGA.png|frame|none|alt=Orabbix SGA|Fig. 6 - Orabbix SGA]]&lt;br /&gt;
[[Image:Orabbix_PINHITRATIO.png|frame|none|alt=Orabbix Pin Hit Ratio|Fig. 7 - Orabbix Pin Hit Ratio]]&lt;br /&gt;
[[Image:Orabbix_SESSIONS.png|frame|none|alt=Orabbix Sessions|Fig. 8 - Orabbix Sessions]]&lt;br /&gt;
[[Image:Orabbix_SESSIONPROCESS.png|frame|none|alt=Orabbix Sessions Processes|Fig. 9 - Orabbix Sessions Processes]]&lt;br /&gt;
[[Image:Orabbix_PGA.png|frame|none|alt=Orabbix PGA|Fig. 10 - PGA]]&lt;br /&gt;
[[Image:Orabbix_LIO.png|frame|none|alt=Orabbix Logical I/O|Fig. 11 - Logical I/O]]&lt;br /&gt;
[[Image:Orabbix_PHIO.png|frame|none|alt=Orabbix Physical I/O|Fig. 12 - Physical I/O]]&lt;br /&gt;
&lt;br /&gt;
==Orabbix Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the Orabbix plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666 &amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of Orabbix at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use Orabbix, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested Oracle host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an Oracle client of any kind for Orabbix to work.&lt;br /&gt;
  Orabbix uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require an Oracle client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x Oracle Server. If you are planning on monitoring an Oracle instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring Orabbix to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download Orabbix to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip Orabbix to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for Orabbix to access your Oracle Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or Oracle instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your Orabbix setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and Oracle.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
Orabbix can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating Orabbix data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===OrabbixDaemon===&lt;br /&gt;
Entries under this tag allow you to set your Orabbix Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the Orabbix Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by Orabbix, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the Orabbix Daemon, it is possible to clone Orabbix and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, Orabbix  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the Oracle (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; Oracle Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through Orabbix against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for Orabbix to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want Orabbix to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, Orabbix would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, Orabbix would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use Orabbix/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The Orabbix daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.Orabbix.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM) \&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “OrabbixDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
Orabbix is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=153</id>
		<title>Orabbix</title>
		<link rel="alternate" type="text/html" href="http://www.smartmarmot.com/wiki/index.php?title=Orabbix&amp;diff=153"/>
				<updated>2011-10-28T14:15:43Z</updated>
		
		<summary type="html">&lt;p&gt;Admin: /* How to Use Orabbix/FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=&amp;#039;&amp;#039;&amp;#039;ORABBIX&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
[[File:orabbix_logo.png]]&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Authors&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&amp;#039;&amp;#039;Andrea Dalle Vacche&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Jason Chatfield&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;Download &amp;amp; Installation Instructions&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
&lt;br /&gt;
=&amp;#039;&amp;#039;&amp;#039;About Orabbix&amp;#039;&amp;#039;&amp;#039;=&lt;br /&gt;
==Product Description==&lt;br /&gt;
Orabbix is a plugin designed to work with Zabbix Enterprise Monitor to provide multi-tiered monitoring, performance and availability reporting and measurement for Oracle Databases, along with server performance metrics.&amp;lt;br&amp;gt;&lt;br /&gt;
It provides an effective mechanism to acquire data from numerous Oracle instances, and in turn provides this information for monitoring and performance metrics to your Zabbix server. You can then utilize the reporting capabilities of Zabbix for all data collected, and provide analysis such as graphs and service level agreement metrics for stakeholders.&amp;lt;br&amp;gt;&lt;br /&gt;
The current distribution contains a set of pre-defined templates which incorporate alerting and graphing capabilities from initial deployment. However these can be fine tuned to suit your needs and data/monitoring requirements.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Orabbix_architecture.png|frame|none|alt=Orabbix Architecture|Fig. 1 - Orabbix Architecture]]&lt;br /&gt;
&lt;br /&gt;
==&amp;#039;&amp;#039;&amp;#039;What can it monitor?&amp;#039;&amp;#039;&amp;#039;==&lt;br /&gt;
Below are some examples of what Orabbix is capable of monitoring:&lt;br /&gt;
* DB Version (i.e. Validity of package)&amp;lt;br&amp;gt;&lt;br /&gt;
* Archiving (Archive log production with trend analysis)&amp;lt;br&amp;gt;&lt;br /&gt;
* Event Waits (Files I/O, single block read, multi-block read, direct path read, SQLNet Messages, Control file I/O, Log Write)&lt;br /&gt;
* Hit Ratio (Hit Ratio on Triggers, Tables/Procedures, SQL Area, Body)&lt;br /&gt;
* Logical I/O (Server performance on Logical I/O of: Current Read, Consistent Read, Block Change)&lt;br /&gt;
* Physical I/O (Redo Writes, Datafile Writes, Datafile Reads)&lt;br /&gt;
* PGA&lt;br /&gt;
* SGA (In particular; Fixed Buffer, Java Pool, Large Pool, Log Buffer, Shared Poolm Buffer Cache)&lt;br /&gt;
* Shared Pool (Pool Dictionary Cache, Pool Free Memory, Library Chache, SQL Area, MISC.)&lt;br /&gt;
* Pin Hit Ratio (Oracle library cache pin are caused by contention with the library cache, the area used to store SQL executables for re-use)&lt;br /&gt;
* Sessions / Processes&lt;br /&gt;
* Sessions (Active Sessions, Inactive Sessions, System Sessions)&lt;br /&gt;
* DBSize/DBFileSize (DBSize size of database really used space and of Filesize)&lt;br /&gt;
&lt;br /&gt;
[[Image:Orabbix_ARCHIVELOG.png|frame|none|alt=Orabbix Archivelog|Fig. 2 - Orabbix Archivelog]]&lt;br /&gt;
[[Image:Orabbix_DBSIZEFILESIZE.png|frame|none|alt=Orabbix DBFileSize|Fig. 3 - Orabbix DBFileSize]]&lt;br /&gt;
[[Image:Orabbix_EVENTWAITS.png|frame|none|alt=Orabbix Events Waits|Fig. 4 - Orabbix Events Waits]]&lt;br /&gt;
[[Image:Orabbix_SHAREDPOOL.png|frame|none|alt=Orabbix Shared Pool|Fig. 5 - Orabbix SHared Pool]]&lt;br /&gt;
[[Image:Orabbix_SGA.png|frame|none|alt=Orabbix SGA|Fig. 6 - Orabbix SGA]]&lt;br /&gt;
[[Image:Orabbix_PINHITRATIO.png|frame|none|alt=Orabbix Pin Hit Ratio|Fig. 7 - Orabbix Pin Hit Ratio]]&lt;br /&gt;
[[Image:Orabbix_SESSIONS.png|frame|none|alt=Orabbix Sessions|Fig. 8 - Orabbix Sessions]]&lt;br /&gt;
[[Image:Orabbix_SESSIONPROCESS.png|frame|none|alt=Orabbix Sessions Processes|Fig. 9 - Orabbix Sessions Processes]]&lt;br /&gt;
[[Image:Orabbix_PGA.png|frame|none|alt=Orabbix PGA|Fig. 10 - PGA]]&lt;br /&gt;
[[Image:Orabbix_LIO.png|frame|none|alt=Orabbix Logical I/O|Fig. 11 - Logical I/O]]&lt;br /&gt;
[[Image:Orabbix_PHIO.png|frame|none|alt=Orabbix Physical I/O|Fig. 12 - Physical I/O]]&lt;br /&gt;
&lt;br /&gt;
==Orabbix Author==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Andrea Dalle Vacche:&amp;#039;&amp;#039;&amp;#039; http://www.smartmarmot.com&lt;br /&gt;
&lt;br /&gt;
=History=&lt;br /&gt;
You can read about the history and evolution of the Orabbix plug-in in these threads below:&lt;br /&gt;
&lt;br /&gt;
Original here: http://www.zabbix.com/forum/showthread.php?t=13666 &amp;lt;br&amp;gt;&lt;br /&gt;
Latest here: http://www.zabbix.com/forum/showthread.php?t=16391&lt;br /&gt;
&lt;br /&gt;
=Distribution=&lt;br /&gt;
You can find the latest versions of Orabbix at the locations listed below:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
http://www.smartmarmot.com/product/orabbix/download/ &amp;lt;br&amp;gt;&lt;br /&gt;
or&amp;lt;br&amp;gt;&lt;br /&gt;
https://sourceforge.net/projects/orabbix/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
To use Orabbix, you will require the following on your Zabbix Server:&lt;br /&gt;
* Zabbix 1.8.x Server&lt;br /&gt;
* Java Runtime Environment 6&lt;br /&gt;
&lt;br /&gt;
Current known successfully tested Oracle host platforms:&lt;br /&gt;
* RHEL5.X (CentOS 5.4 &amp;amp; 5.5)&lt;br /&gt;
* Windows 2003 (with Java SE 1.6)&lt;br /&gt;
* HP-UX 11.31&lt;br /&gt;
* AIX 5.3&lt;br /&gt;
&lt;br /&gt;
Currently known tested Oracle Versions:&lt;br /&gt;
* 10g&lt;br /&gt;
* 10.2&lt;br /&gt;
&lt;br /&gt;
  IMPORTANT&lt;br /&gt;
  You do NOT need to install an Oracle client of any kind for Orabbix to work.&lt;br /&gt;
  Orabbix uses Java objects and connection strings to connect to the Oracle Database, and as such doesn’t require an Oracle client to be installed on your Zabbix Server.&lt;br /&gt;
  Installation&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
The installation instructions have been created based on instructions for most *nix deployments (i.e. RHEL/CentOS), and is assumed that any alterations required for your specific environment are to be taken into account accordingly.&lt;br /&gt;
&lt;br /&gt;
This guide is based upon there being two (2) Hosts, 1x Zabbix Server and 1x Oracle Server. If you are planning on monitoring an Oracle instance that is running on your Zabbix Server, the steps are the same, with minor adjustments required for your connection information.&lt;br /&gt;
&lt;br /&gt;
The steps also assume you are configuring Orabbix to monitor a new installation or setup of Oracle. The installation steps will have you GRANT access for the Zabbix user to all tables, and this will include any USER tables present at the time of execution. If you do not want Zabbix to have access to specific tables or resources within your database, you will need to set a DENY to the Zabbix users access  as required. Consult your DBA for details, as this is beyond the scope of these instructions.&lt;br /&gt;
&lt;br /&gt;
==Steps for Installation==&lt;br /&gt;
&lt;br /&gt;
* Download Orabbix to your Zabbix Server&lt;br /&gt;
* On your Zabbix server, unzip Orabbix to:  /opt/orabbix&lt;br /&gt;
* Copy file /opt/orabbix/init.d/orabbix to /etc/init.d/orabbix&lt;br /&gt;
* Grant execute permissions to the following files:&lt;br /&gt;
  /etc/init.d/orabbix&lt;br /&gt;
  /opt/orabbix/run.sh&lt;br /&gt;
* Create a User (ZABBIX) for Orabbix to access your Oracle Database. You can use the following script:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  CREATE USER ZABBIX&lt;br /&gt;
  IDENTIFIED BY &amp;lt;REPLACE WITH PASSWORD&amp;gt;&lt;br /&gt;
  DEFAULT TABLESPACE SYSTEM&lt;br /&gt;
  TEMPORARY TABLESPACE TEMP&lt;br /&gt;
  PROFILE DEFAULT&lt;br /&gt;
  ACCOUNT UNLOCK;&lt;br /&gt;
  – 2 Roles for ZABBIX&lt;br /&gt;
  GRANT CONNECT TO ZABBIX;&lt;br /&gt;
  GRANT RESOURCE TO ZABBIX;&lt;br /&gt;
  ALTER USER ZABBIX DEFAULT ROLE ALL;&lt;br /&gt;
  – 5 System Privileges for ZABBIX&lt;br /&gt;
  GRANT SELECT ANY TABLE TO ZABBIX;&lt;br /&gt;
  GRANT CREATE SESSION TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
  GRANT UNLIMITED TABLESPACE TO ZABBIX;&lt;br /&gt;
  GRANT SELECT ANY DICTIONARY TO ZABBIX;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE&amp;#039;&amp;#039;&amp;#039; : If you are using Oracle 11g, you will need to add the following:&lt;br /&gt;
  &lt;br /&gt;
  exec dbms_network_acl_admin.create_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;,description =&amp;gt; &amp;#039;resolve acl&amp;#039;, principal =&amp;gt;&amp;#039;ZABBIX&amp;#039;, is_grant =&amp;gt; true, privilege =&amp;gt; &amp;#039;resolve&amp;#039;);&lt;br /&gt;
  exec dbms_network_acl_admin.assign_acl(acl =&amp;gt; &amp;#039;resolve.xml&amp;#039;, host =&amp;gt;&amp;#039;*&amp;#039;);&lt;br /&gt;
  commit;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can verify the above is correct by running:&lt;br /&gt;
  select utl_inaddr.get_host_name(&amp;#039;127.0.0.1&amp;#039;) from dual;&lt;br /&gt;
&lt;br /&gt;
* For this example on RedHat, run:&lt;br /&gt;
  chkconfig -add orabbix&lt;br /&gt;
* Verify with:&lt;br /&gt;
  chkconfig -list&lt;br /&gt;
* Create a Host entry in Zabbix for the DB Instance/s you are planning to monitor, and import the templates found at: /opt/orabbix/template&lt;br /&gt;
&lt;br /&gt;
  Please note, instructions for this step can be found in the Zabbix Manual at&lt;br /&gt;
  http://www.zabbix.com/documentation.php&lt;br /&gt;
  With this step, &amp;#039;&amp;#039;&amp;#039;ensure the name of your host in Zabbix is the same name of the SID or Oracle instance name&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
=Configuration=&lt;br /&gt;
Now we need to configure your Orabbix setup. The tags below are listed as they will appear within the respective configuration files. The first you will need to modify is your config.props file to define your connection properties for Zabbix and Oracle.&lt;br /&gt;
&lt;br /&gt;
==config.props==&lt;br /&gt;
The config.props file can be found at /opt/orabbix/conf/config.props&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;&lt;br /&gt;
  #comma separed list of Zabbix servers&lt;br /&gt;
The settings under this tag allow you to configure your Zabbix Server information.&lt;br /&gt;
Orabbix can also be configured to send your Oracle data to multiple Zabbix servers.&lt;br /&gt;
&lt;br /&gt;
  This can be beneficial for distributed monitoring scenarios, server migrations or replicating Orabbix data  to a Disaster Recovery site or server.&lt;br /&gt;
&lt;br /&gt;
Replace with your Zabbix Server info where appropriate;&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServerList&amp;#039;&amp;#039;=ZabbixServer1,ZabbixServer2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Address&amp;#039;&amp;#039;=192.168.0.1&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer1.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
  &lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Address&amp;#039;&amp;#039;=192.168.0.2&lt;br /&gt;
  &amp;#039;&amp;#039;ZabbixServer2.Port&amp;#039;&amp;#039;=10051&lt;br /&gt;
&lt;br /&gt;
===OrabbixDaemon===&lt;br /&gt;
Entries under this tag allow you to set your Orabbix Daemon parameters.&lt;br /&gt;
&lt;br /&gt;
  #MaxThreadNumber should be &amp;gt;= than the number of your databases&lt;br /&gt;
Set the number of threads the Orabbix Daemon should have inside his internal pool of DB Jobs. This number should be at least equal to (or more than) then number of databases monitored by Orabbix, now this parameter if not set is automatically calculated.&lt;br /&gt;
&lt;br /&gt;
e.g. For 50 Databases, we are using 100 threads&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.MaxThreadNumber&amp;#039;&amp;#039;=100&lt;br /&gt;
&lt;br /&gt;
  #pidFile&lt;br /&gt;
Next you can set the location of the Daemons PID file. Default location is: /opt/orabbix/logs&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;OrabbixDaemon.PidFile&amp;#039;&amp;#039;=./logs/orabbix.pid&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Relative path is permitted here&lt;br /&gt;
&lt;br /&gt;
  &amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; With the features of the Orabbix Daemon, it is possible to clone Orabbix and use different configurations. &lt;br /&gt;
       As such, it is therefore possible to have one Daemon that checks your TEST databases, another iteration that checks your&lt;br /&gt;
       DEVELOPMENT databases and a third that checks your PRODUCTION databases, each with different timings and check loops!&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;DatabaseList&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is where you define your database instances. You can specify more than one instance here, separated using a comma.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList=EXAMPLE1,EXAMPLE2&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE: The names of the instances must match those you have specified as your HOST name in Zabbix&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  #Configuration of Connection pool&lt;br /&gt;
From here, you will configure settings that are specific to the connection pool.&lt;br /&gt;
As the comments in config.props suggest, if you do not specify these values, Orabbix  will use default values which have been hard-coded.&lt;br /&gt;
&lt;br /&gt;
  #Maximum number of active connection inside pool&lt;br /&gt;
Set the maximum number of connections that can be allocated to this pool at any time,or alternatively set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxActive=10&lt;br /&gt;
&lt;br /&gt;
  #The maximum number of milliseconds&lt;br /&gt;
Here you define how long that the pool will wait (when there are no available  connections) for a connection to be returned before throwing an exception, or set the value &amp;lt;= 0 to wait indefinitely.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxWait=100&lt;br /&gt;
&lt;br /&gt;
Also under the same section, you can define the maximum number of connections that can remain idle within the connection pool, without being released. Alternatively, you can set a negative value for no limit.&lt;br /&gt;
&lt;br /&gt;
  DatabaseList.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	You can specify the Database connection parameters for each database you wish to monitor individually, underneath your Database Connection Parameters. This allows  you to customise your connection settings based on the Database constraints I.e one connection pool for your PRODUCTION DB and another for 		you TEST DB, for example;&lt;br /&gt;
&lt;br /&gt;
  DB1.MaxActive=10&lt;br /&gt;
  DB1.MaxWait=100&lt;br /&gt;
  DB1.MaxIdle=1&lt;br /&gt;
&lt;br /&gt;
Note that any settings defines this way will override the general settings for your generic connection pool.&lt;br /&gt;
&lt;br /&gt;
===Database Connection Parameters===&lt;br /&gt;
&lt;br /&gt;
This section sets your connection string to the Oracle Database. This string invokes a Java Database Connector (JDBC) to your Oracle Databases, and as such does not need the Oracle Client to be installed.&lt;br /&gt;
&lt;br /&gt;
  #define here your connection string for each database&lt;br /&gt;
Here you will define the connection string. These are formatted as:&lt;br /&gt;
DBName.Url(as specified in your DatabaseList) followed by the jdbc string and your Database Server information.&lt;br /&gt;
  EXAMPLE1.Url=jdbc:oracle:thin:@SERVER1.EXAMPLE.COM:1521:DB1&lt;br /&gt;
&lt;br /&gt;
Set your Database username and password below. e.g.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE1.User=zabbix&lt;br /&gt;
  EXAMPLE1.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	Setting connections to multiple databases is made easy by adding more connection strings, with their corresponding credentials. Example given below.&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE2.Url=jdbc:oracle:thin:@server2.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE2&lt;br /&gt;
  EXAMPLE2.User=zabbix&lt;br /&gt;
  EXAMPLE2.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
  EXAMPLE3.Url=jdbc:oracle:thin:@server3.domain.example.com:&amp;lt;LISTENER_PORT&amp;gt;:EXAMPLE3&lt;br /&gt;
  EXAMPLE3.User=zabbix&lt;br /&gt;
  EXAMPLE3.Password=zabbix_password&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039;After these entries, you can set your MaxActive, MaxWait and MaxIdle for the individual database connections if you so wish.&lt;br /&gt;
&lt;br /&gt;
There is a pair of default parameter:&lt;br /&gt;
&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the following pair&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
It is only possible to override Username or Password.&lt;br /&gt;
&lt;br /&gt;
===Query List File===&lt;br /&gt;
&lt;br /&gt;
This defines where the file containing the Oracle (SQL) queries can be found. This is a customisable file. You can find the query parameter file at:&lt;br /&gt;
&lt;br /&gt;
  QueryListFile=/opt/orabbix/conf/query.props&lt;br /&gt;
you can also specify :&lt;br /&gt;
  &amp;lt;DBNAME&amp;gt;.QueryListFile=./confQueryTest.props this file specify the query 	file of a database relative path are allowed&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039; This is really useful to use different query file for different databases or to have a pool of query file one for each&amp;lt;br&amp;gt; Oracle Release (if you have different release) and/or to have different query files for Production environment, Test environment, Developement environment etc..&amp;lt;br&amp;gt;&lt;br /&gt;
the following parameter&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile ==./confQueryTest_2.props&lt;br /&gt;
&lt;br /&gt;
adds another custom query to the default query file.&lt;br /&gt;
If there are duplicates the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
==query.props==&lt;br /&gt;
Configuration of query.props file&lt;br /&gt;
&lt;br /&gt;
The query.props file can be modified or added to, so you can supply your own customised queries through Orabbix against your Oracle instances/databases. Each query created has an associated &amp;#039;Item&amp;#039; or item name that Zabbix will use to identify the query.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE:&amp;#039;&amp;#039;&amp;#039; Item names must be unique.&lt;br /&gt;
&lt;br /&gt;
The configurable items are formatted as follows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You have to set the query name under the QueryList in the query.props file. Each query name is comma separated. For example;&lt;br /&gt;
&lt;br /&gt;
  QueryList=queryName1,queryName2,queryName3&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
You must identify the query by the unique item name you specified in the QueryList, followed by &amp;#039;.Query&amp;#039; for Orabbix to recognize that this is the query string. Its important to	remember NOT to add the semi-colon “;” to the end of your custom query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.Query=yourQueryHere&lt;br /&gt;
&lt;br /&gt;
Now you can define what you want Orabbix to return to your Zabbix Server if no data is found for your query.&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.NoDataFound=none&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;	In the example above, Orabbix would send the string  “none” to the Zabbix Server.&lt;br /&gt;
&lt;br /&gt;
You can specify if you want a different execution period for your query&lt;br /&gt;
  customQueryItemName.Period=&amp;lt;Express a period in minute&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;You can change the execution time of dbversion that don’t change often&lt;br /&gt;
&lt;br /&gt;
Next you can specify a query that will be executed and if return RaceCondiftionValue the query customQueryItemName is  executed otherwise is skipped&lt;br /&gt;
&lt;br /&gt;
  customQueryItemName.ACTIVE=[true|false] if true query is executed otherwise skipped&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  archive.Query=select round( A.LOGS*B.AVG/1024/1024/10 ) \&lt;br /&gt;
  from ( SELECT  COUNT (*)  LOGS FROM V$LOG_HISTORY WHERE \&lt;br /&gt;
  FIRST_TIME &amp;gt;= (sysdate -10/60/24)) A, \&lt;br /&gt;
  ( SELECT Avg(BYTES) AVG,  Count(1), Max(BYTES) Max_Bytes,Min(BYTES) Min_Bytes  FROM  v$log) B&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionQuery=select value \&lt;br /&gt;
  from \&lt;br /&gt;
  v$parameter where name=&amp;#039;log_archive_start&amp;#039;&lt;br /&gt;
&lt;br /&gt;
  archive.RaceConditionValue=FALSE&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;In the example above, Orabbix would execute “archive.Query” only if the query “archive.RaceConditionQuery” return  the value “archive.RaceConditionValue”. Pratically the “Archive” query is execute only if database is in arhivelogmode (Parameter “log_archive_start” set to TRUE)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Trim=[true|false]&lt;br /&gt;
if true the resultset is trimmed (default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.AddSpaces=[true|false]&lt;br /&gt;
if true the add a space between columns of resultset(default is true)&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExcludeColumnsList=[1,2,3,..n]&lt;br /&gt;
exclude from result set the 1st, the 2nd etc.. columns from resultset&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.Period&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing such will &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Added the following parameter on main configuration file:&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
  &amp;lt;QueryName&amp;gt;.ExtraQueryListFile = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
on query&amp;#039;s properties file I&amp;#039;ve added the following parameter:&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
with these parameter you can define a default username and password for&lt;br /&gt;
all the database.&lt;br /&gt;
  DefaultUser = &amp;lt;USERNAME&amp;gt;&lt;br /&gt;
  DefaultPassword = &amp;lt;PASSWORD&amp;gt;&lt;br /&gt;
this default parameter can be overridden using the couple&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.User and &amp;lt;DB_NAME&amp;gt;.User&lt;br /&gt;
Is possible to override only Username or Password.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;DB_NAME&amp;gt;.ExtraQueryListFile =&lt;br /&gt;
add another custom query to a default query file.&lt;br /&gt;
if there are duplicate the ExtraQueryListFile will override them.&lt;br /&gt;
&lt;br /&gt;
the following parameter&lt;br /&gt;
  &amp;lt;QUERY_NAME&amp;gt;.WhenNotAlive = &amp;lt;VALUE&amp;gt;&lt;br /&gt;
is used to specify a value or a string to send if a database is not working,&lt;br /&gt;
doing so you are going to &amp;quot;clean&amp;quot; the graphs generated in Zabbix with a &amp;quot;set&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
=How to Use Orabbix/FAQ=&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How do I start/stop the Daemon?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
To start the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
To stop the Orabbix Daemon, simply run:&amp;lt;br&amp;gt;&lt;br /&gt;
  /etc/init.d/orabbix start&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How does Logging work?&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
The Orabbix daemon outputs its log file to the default location of /opt/orabbix/logs/&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;How to modify Log format?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Logging properties can be modified by making your required changes to&amp;lt;br&amp;gt;&lt;br /&gt;
  /opt/orabbix/conf/log4j.properties&lt;br /&gt;
&lt;br /&gt;
The property setting responsible for defining the output location is:&amp;lt;br&amp;gt;&lt;br /&gt;
  log4j.appender.Orabbix.File=logs/orabbix.log&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;TIP:&amp;#039;&amp;#039;&amp;#039;From this properties file, you can modify the location, file name and log format as desired.&lt;br /&gt;
For additional information, please refer to the official log4j documentation, found at: http://logging.apache.org/log4j/1.2/index.html &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Is there a way for orabbix to connect to RAC or DataGuard?&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Yes is possible.&amp;lt;br&amp;gt;&lt;br /&gt;
e.g.&amp;lt;br&amp;gt;&lt;br /&gt;
If you have two host RAC1 and RAC2 and one instance RACINST&amp;lt;br&amp;gt;&lt;br /&gt;
you should write the connection string as follow:&amp;lt;br&amp;gt;&lt;br /&gt;
  RACINST.Url=jdbcracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=RAC1.EXAMPLE.COM)&lt;br /&gt;
  (PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=RAC2.EXAMPLE.COM)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=RACINST)))&lt;br /&gt;
&lt;br /&gt;
==What can I modify without restarting the daemon?==&lt;br /&gt;
The parameters that are dynamically read at each iteration of “OrabbixDaemon.Sleep” are as follows;&lt;br /&gt;
&lt;br /&gt;
* Any Query added to query.props&lt;br /&gt;
* Modifications to config.props&lt;br /&gt;
* Database List&lt;br /&gt;
&lt;br /&gt;
Currently, the only known items that don&amp;#039;t dynamically update are the  ZabbixDaemon.MaxThreadNumber, and changes to Connection Pool info.&lt;br /&gt;
&lt;br /&gt;
=LICENCE Information=&lt;br /&gt;
[[Image:orabbix_logo.png|left]]&lt;br /&gt;
Orabbix is released under and according to the &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GNU GENERAL PUBLIC LICENSE&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Version 3, 29 June 2007&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>