Database Counter Monitor
The SiteScope Database Counter Monitor allows you to monitor the availability
of any database through a JDBC driver. The error and warning thresholds
for the monitor can be set on as many as ten database server performance statistics.
Usage Guidelines
Use the Database Counter Monitor to make SQL queries for performance metrics
from any JDBC-accessible database. This monitor provides optional support for
calculating deltas and rates for metrics between monitor runs.
You can monitor multiple counters with a single monitor
instance. This allows you to watch server loading for performance,
availability, and capacity planning.
The following are several key requirements for using the Database Counter
Monitor:
- You must have a copy of the applicable JDBC database driver
file (for example, the Oracle thin driver is packaged in a file called classes12.zip)
on the SiteScope server. Copy the downloaded driver file into the
<SiteScope install path>\SiteScope\java\lib\ext subdirectory.
If the file is in zip format, DO NOT unzip the file.
Stop and restart the SiteScope service after copying the driver file to
the SiteScope machine.
- You must supply the correct Database Connection URL, a
database username and password when setting up the monitor. The syntax
of the Database Connection URL may vary depending on which JDBC driver and
which type of database you wish to monitor. For example to monitor an Oracle
database using the Oracle thin driver, the URL you need to use has the form:
jdbc:oracle:thin:@<host>:<tcp port>:<database sid>.
To monitor a Postgresql database, the URL is of the form:
jdbc:postgresql://<host>:<port>/<database>
- You must specify the Database Driver that was
installed on the SiteScope server when setting up the monitor. The Database
Driver is just the name of a Java class in X.Y.Z format. For example, the
Database Driver for the Oracle thin JDBC driver is:
oracle.jdbc.driver.OracleDriver
And the Database Driver for the Postgresql JDBC driver is:
org.postgresql.Driver
- Generally, you should only have one instance of each type of JDBC
driver client installed on the SiteScope machine. If there is more than
one instance installed, SiteScope may report an error and be unable to
connect to the database. For example, installing two classes12.zip files
from two different versions of Oracle will probably not work.
- You must have a database user login that SiteScope will use to
access the database. SiteScope will only be able to execute the SQL queries
that this user has permission to execute on the database.
The default run schedule for this monitor is every 10 minutes, but you
can change it to run more or less often using the Update every
setting.
Completing the Database Counter Monitor Form
To display the Database Counter Monitor Form, either click the Edit
link for an existing Database Counter Monitor in a monitor table, or click the
add a Monitor link on a group's detail page and click the
Add Database Counter Monitor link.
Complete the items on the Database Counter Monitor Form as follows. When the
required items are complete, click the Add Monitor button.
- Server
-
Select the server you want to monitor. Use the choose server
link to view a list of servers or to enter the connection URL to
the database. The Choose Server for: Database Counter Monitor screen
displays the following input fields:
- Database Connection URL - enter the connection URL to the database
you want to monitor. For example, jdbc:oracle:thin:@192.168.0.50:1521:ORCL.
- Query An SQL query that returns at least two columns of data. The values in the
first column of data are interpreted as the labels for the entries in the each row. The values
in the first row are treated as labels for each entry in the column. This is best explained in
an example. For an Oracle database, the query SELECT 'Undo Segment No. ' || USN , GETS, WAITS FROM V$ROLLSTAT
returns a result set like this:
| UNDOSEGMENTNO.||USN | GETS | WAITS |
| Undo Segment No. 0 | 16835 | 0 |
| Undo Segment No. 1 | 55414 | 0 |
| Undo Segment No. 2 | 156588 | 0 |
| Undo Segment No. 3 | 45661 | 0 |
| Undo Segment No. 4 | 45619 | 0 |
| Undo Segment No. 5 | 45671 | 0 |
| Undo Segment No. 6 | 45581 | 0 |
| Undo Segment No. 7 | 45575 | 0 |
| Undo Segment No. 8 | 45545 | 0 |
| Undo Segment No. 9 | 45569 | 1 |
| Undo Segment No. 10 | 45534 | 0 |
| Undo Segment No. 11 | 45513 | 0 |
| Undo Segment No. 12 | 45536 | 0 |
For this query, the resulting browsable tree of counters would be:
- Database User Name - enter the user name that SiteScope should use
to connect to the database.
- Database Password - enter the password for the user name
that SiteScope should use to connect to the database.
- Database Driver - enter the driver used to connect
to the database. For example, org.postgresql.Driver.
- Connection Timeout - Enter an optional time out value,
in seconds, that SiteScope should wait for a database connection to respond.
If the database connection can not be completed within the period specified, SiteScope
will report an error.
Note:The sum of the Connection Timeout value and Query
Timeout value should always be less than the Update every
value for the monitor. For example, if the monitor Update every value is
set to 10 minutes, this equates to 600 seconds.
- Query Timeout - Enter an optional time out value,
in seconds, that SiteScope should wait for a response from the database query.
If the database does not respond within the period specified, SiteScope
will report an error.
Note:The sum of the Connection Timeout value and Query
Timeout value should always be less than the Update every
value for the monitor. For example, if the monitor Update every value is
set to 10 minutes, this is equivalent to 600 seconds. If both the the
Connection Timeout value and Query
Timeout value are set to 120 seconds, the sum of these would be 240 seconds.
Note: Some commonly used databases and database drivers
do not support the query timeout feature. In these cases the Query
Timeout value should be set to zero.
- Counters
-
Select the server performance parameters or counters you want to
check with this monitor. The table list to the right of this item
displays those currently selected for this monitor. Use the choose
counters link to bring up the counters selection screen. Check or
clear the check boxes on the choose counters screen to select
between one to ten counters to monitor on this server.
- Update every
-
Select how often the monitor should read the server statistics.
The default interval is to run or update the monitor once every 10 minutes.
Use the drop-down list to the right of the text box to specify another update
interval in increments of seconds, minutes, hours, or days. The update interval
must be 15 seconds or longer.
- Title
-
Enter a title text for this monitor. This text is displayed in the
group detail page, in report titles, and other places in the SiteScope
interface. If you do not enter a title text, SiteScope will
create a title based on the host, server, or URL being monitored.
Advanced Options
The Advanced Options section presents a number of ways to customize
monitor behavior and display. Use this section to customize error and warning
thresholds, disable the monitor, set monitor-to-monitor dependencies, customize
display options, and enter other monitor-specific settings required for
special infrastructure environments. The options for this monitor type are
described below. Complete the entries as needed and click the Add
or Update button to save the settings.
- Disable
-
Check this box to temporarily disable this monitor and any
associated alerts. To enable the monitor again, clear the box.
- Divisor Query
-
An SQL query which will return a single numeric value. The value of each counter
is calculated by dividing the counter value as retrieved from the database divided
by the Divisor Query value.
- DB Machine Name
-
The identifier for the target database server, as it should be reported to Mercury
Application Management.
- No Cumulative Counters
-
Selecting this checkbox turns off the default behavior of calculating the value of a
counter as the difference between that counter's cumulative values (as retrieved from
the database on consecutive monitor runs).
- No Divide Counters
-
Selecting this checkbox turns off the default behavior of calculating the value of a counter
as the value retrieved from the database (or the delta of two values retrieved from the database
over consecutive monitor runs) divided by some number. The divisor is either taken from the Divisor
Query, or it is the elapsed time in seconds since the previous monitor run.
- Verify Error
-
Check this box if you want SiteScope to automatically run this
monitor again if it detects an error. When an error is detected,
the monitor will immediately be scheduled to run again once.
Note: In order to change the run frequency of this
monitor when an error is detected, use the Update every (on
errors) option below.
Note: The status returned by the Verify Error run
of the monitor will replace the status of the originally scheduled
run that detected an error. This may cause the loss of important
performance data if the data from the verify run is different than
the initial error status.
Warning: Use of this option across many monitor instances
may result in significant monitoring delays in the case that
multiple monitors are rescheduled to verify errors at the same
time.
- Update Every (on error)
-
You use this option to set a new monitoring interval for
monitors that have registered an error condition. For example, you
may want SiteScope to monitor this item every 10 minutes normally,
but as often as every 2 minutes if an error has been detected. Note
that this increased scheduling will also affect the number of
alerts generated by this monitor.
- Schedule
-
By default, SiteScope monitors are enabled every day of the
week. You may, however, schedule your monitors to run only on
certain days or on a fixed schedule. Click the Edit
schedule link to create or edit a monitor schedule.
For more information about working with monitor schedules,
see the section on Schedule
Preferences for Monitoring.
- Monitor Description
-
Enter additional information about this monitor. The Monitor
Description can include HTML tags such as the <BR>
<HR>, and <B> tags to control display format and style.
The description will appear on the Monitor Detail page.
- Report Description
-
Enter an optional description for this monitor that will make it easier to
understand what the monitor does. For example, network traffic or
main server response time. This description will be displayed on
with each bar chart and graph in Management Reports and appended to
the tool-tip displayed when you pass the mouse cursor over the
status icon for this monitor on the monitor detail page.
- Depends On
-
To make the running of this monitor dependent on the status of
another monitor or monitor group, use the drop-down list to select
the monitor on which this monitor is dependent. Select
None to remove any dependency.
- Depends Condition
-
If you choose to make the running of this monitor dependent on the
status of another monitor, select the status condition that the
other monitor or monitor group should have in order for the current
monitor to run normally. The current monitor will be run normally
as long as the monitor on which it depends reports the
condition selected in this option.
- List Order
-
By default, new monitors are listed last on the Monitor Detail
page. You may use this drop-down list to choose a different
placement for this monitor.
Setting Monitor Status Thresholds
SiteScope Application Monitors allow you to set multiple threshold
conditions to determine the status reported by each monitor. The individual
conditions are combined as logical OR relationships so that when one or
more of the conditions (for example any of the conditions for Error
if) are met the monitor status is set to the applicable condition. If
multiple conditions are met for more than one status condition (such as
conditions for both error and for warning), the status for the monitor is
set to the highest valued condition. Thus a match of an error condition and
a warning condition would be reported as an error status, error
being the highest value, warning the next highest and good
the lowest value.
- Error if
-
Use one or more of the selection boxes in this item to define one
or more error conditions for this monitor. Use the drop-down lists
in these items to change error threshold(s) relative to the
counters you have selected to check
with this monitor. After choosing a counter or parameter, use
the comparison operator drop-down list to specify an error
threshold such as: >= (greater than or equal to), != (not
equal to), or < (less than) and enter a comparison value in
the box provided. Comparison values should be entered as whole
numbers.
- Warning if
-
Use one or more of the selection boxes in this item to define one
or more warning conditions for this monitor. Use the drop-down
lists in these items to change warning threshold(s) relative to the
counters you have selected to check with
this monitor. Set these values relative to those you set for the
error threshold in the Error if item.
-
- Good if
-
You can set this monitor to return a good status for certain
conditions. You may define those conditions here. Complete this
item as you would for the Error if and Warning if
items.
|