#---------------------------------------------------------------
#
# karma.conf
#
# this file configures the karma Oracle database monitoring
# utility.  Hopefully this will eventually be updatable
# via a web front-end.
#
# The format of most lines in this file is:
#
# SERVICE:X:Y:Z
#
# The SERVICE can be one of these:
# redologs, rollback, tablespaces, slow_sql, alert_log, hit_ratios, 
# fragmentation, extents, latch, mts
#
# X  - how often (in minutes) to monitor this info
# Y  - warning threshold
# Z  - alert threshold
#
# A service is not monitored if it's time column is 0, or it is 
# commented out with the # character, or if it is not in the
# file at all.  For repeated entries, the last one listed will
# be used.
#
# The "karma" line in this file follows a special convention.
# It looks like this:
#
# karma:name:user:pass:X
#
# where "name" is listed as a service in the tnsnames.ora file.
# "user" is the user to login to the database as, and "pass"
# is the password to use.  X is how often the karma.pl script
# should wake up to check your database.  You should have
# *many* of these lines, one for each database you wish to
# monitor.  Conversely you can specify:
#
# karma:ALL:user:pass:X
#
# meaning every entry in the tnsnames.ora file.  I'm not sure
# if this will be much use though, as they'll all have to have
# the same username and password.  If you have a service named 
# "ALL", sorry.  :-)
#
# In addition to the "karma" line, the "refresh" directive is
# special as well.  It looks like this:
#
# refresh:X
#
# X is how often the generated html page should refresh.
# It's probably a good idea for this value to be less than
# the refresh karma does for that database.
#
#---------------------------------------------------------------





#
# specifies databases to monitor
# 
# First field is always "karma" meaning, this is a database definition
# line.  The second field is a name from your tnsnames.ora file.  The
# The second field is a name from your tnsnames.ora file.  The
# third and fourth fields are your username and password respectively.
# Also, you'll notice that the first line specified below is not the 
# sys user.  If you specify another user besides sys or system, the user
# must have "SELECT ANY TABLE" privilege.
#
# NOTE:  We'll need a more secure way of specifying usernames and
# passwords for the future. 
#
karma:DB1:karma:amrak
karma:DB2:karma:amrak

#
# refresh 
#
# first number is in minutes, how often karma refreshes
# (There should probably be some checking on this so if you 
# have a quicker refresh for some other service, karma will
# wake up to refresh those...)
#
refresh:5:75

#
# monitor redolog switching, threshold values in minutes
#
redologs:1:30:15

#
# rollback segment contention
#
rollback:1:0:0

#
# tablespace quotas
#
tablespace:1:85:95

#
# slow running sql, that is queries that perform a lot of disk reads
# the thresholds here amount to number of diskreads.  The query checks
# for anything in v$sqlarea above the specified threshold of diskreads
# (it does not consider executions assuming that (a) slow queries often
# don't get reexecuted over and over - debatable, and (b) it speeds up
# this query noticeably
#
slowsql:1:100:200

#
# ORA errors in the alert log
# These numbers represent the number of minutes
# we're concerned about.  Alert if we've had ORA- errors in
# the alert log in the last 60 minutes, warn if we've had
# any within 24 hours
#
alertlog:1:60:86400

#
# various system hit ratios
# (expressed as percentages...)
# below the given value is a warn or alert
#
hitratios:1:95:70

#
# tablespace fragmentation
#
fragmentation:1:0:0

#
# objects nearing their maxextents or those which will not be able
# to allocate their next extent
#
# below we warn when we're at our second to last extent (1 from maxextents)
# and alert when we're AT our maxextents (0 from maxextents)
#
extents:1:2:1

#
# latch contention
#
latch:1:0:0

#
# monitors shared server and dispatcher process contention
# more than the give value % busy is a warn or alert
#
mts:1:50:75

#
# monitors OS statistics (if the table exists)
# 
# The code in karma will check for the existance of the KARMA_OS_STATS
# table and display NO_STATUS if it doesn't exist, however, it's
# cleaner to just comment out the service here if you haven't created
# the appropriate tables.
#
os:1:5:10


