MonitorDB

Monitor DB is a simple SQL visualisation tool that enables you to chart triplet values to a graph and record the values to a file. Whilst it is expected it will mainly monitor Database Stats it can be used to chart anything that can be selected with SQL inside of an Oracle Database. image-center

Installation and Configuration

You’ll need a JVM (OpenJDK or Oracle) of version 17 and above. The tool can be downloaded from here. After downloading the file, unzip the file and change into the bin directory. You can edit the monitordb.xml file to reflect your environment or use the command line options to specify another configuration file.

Queries are added to a simple XML file (monitordb.xml by default) in triplet form “Name of Category”, “Color”, “Value”. The first two are character strings and the second is a numerical value. “Color” can be a typical colour i.e. red, blue, green, yellow etc. or an RGB triplet of the form “color(R,G,B) ie. “color(123,123,240)” as seen here.

<MonitoredSQL>
    <Description>I/O Requests (MB/sec)</Description>
    <SQL>select  'I/Os (write) (MB/sec)' category , 'Red' Color, sum(value) value from gv$sysstat where NAME = 'physical write bytes'
        union
        select  'I/Os (read) (MB/sec)' category, 'Green' Color, sum(value) value from gv$sysstat where NAME = 'physical read bytes'
    </SQL>
    <ProcessingBetweenExecutions>Difference</ProcessingBetweenExecutions>
    <ChartType>Stacked</ChartType>
    <DivideBy>1048576</DivideBy>
    <RefreshRate>1</RefreshRate>
    <Enabled>true</Enabled>
</MonitoredSQL>

They can be column based triplets i.e.

select 'cat1','red', 10, 'cat2', 'blue', 20, 'cat3', 'green', 30
from dual

or row based i.e.

select 'cat1','red', 10
from dual
union
select 'cat2','blue', 20
from dual
union
select 'cat3','green', 30
from dual

You can modify some of the attributes of the query TextWrangler The element has two possible values “Difference” and ”None”. Difference will display a delta between the values and None will render the values as they are returned. The element also has two values “Stacked” and “Line”. The element can be set to “true” or “false”. Setting it to false will not display the chart. The element controls how often the chart is updated. The element allows you to divide the results by a given value.

It is also possible to start recording the values displayed with the by toggling the “Record Data” button on each of the charts. The resulting data will be written to a file in the local directory.