title: Check various aspects of ORACLE tablespaces
agents: linux, hpux
author: Mathias Kettner <mk@mathias-kettner.de>
license: GPL
distribution: check_mk
description:
 This check monitors the state of ORACLE tablespaces. It
 checks the current and maximum size, the online state
 and the autoextension and optionally the setting of
 the increment size.

 {Autoextension}: During inventory the autoextension
 setting is determined and frozen into the check parameter.
 That means that if the auto extension setting changes
 later, the check will get critical. A table space may
 consist of several data files with different settings.
 If at least one data file has auto extension turned on,
 the table space is considered to have auto extension
 turned on. You can turn off auto extension checking
 by setting the first check parameter to {None} rather
 then to {True} or {False}. Inventory will do this for
 you if you set {oracle_tablespaces_check_autoext} to {False}.

 {Increment size}: If the configuration parameter
 {oracle_tablespaces_check_default_increment} is set to
 {True} (which is the defaut), then the check will warn
 you, if the increment size is set to the ORACLE default
 value of {1} (which is generally considered as a non-optimal
 setting).

 {State}: Only table spaces in state {ONLINE} and {READONLY}
 will be found by inventory and monitored. If the state changes
 later, the check will {not} get critical. The state will
 just be displayed. We assume that state changes are due
 to normal operations.

 {Size}: The logic of the size check depends on whether
 autoextend is on or off. If auto extension is on, then
 the still possible extensions are accounted for as free
 spaces as well as the space currently free in the
 data files. If auto extension is off, only the currently
 free space will be honored. Table spaces in state {READONLY}
 will {not} be checked for the size. 

 This check needs the Check_MK {mk_oracle}-plugin installed in
 the agent. Please refer to the online documentation
 for how to install that plugin.

item:
 A string composited of the SID and the tablespace name,
 separated by a dot, for example {"pengt.TEMP"}.

examples:
 # Set levels for free space to 20% (WARN) and 10% (CRIT)
 # of maximum tablespace size
 oracle_tablespaces_default_levels = (20.0, 10.0)

perfdata:
 Three values in bytes: the current size, the used size of the tablespace
 and the maximum size of the table space.

inventory:
 One separate check will be created for each tablespace
 which is {ONLINE}.

[parameters]
autoextend(bool): Either {True} or {False} - depending on
 wether auto extension is expected to be on or off.
warn(int / float): Warning level for free space. If this is a float, 
 it is considered as percentage of the maximum size of the tablespace. 
 If it is an integer, it is considered to be MB of free space. If the 
 space drops to this level or below, the check will get into warning state.
crit(int / float): The critical level for free space.

[configuration]
oracle_tablespaces_default_levels(int/float, int/float): The default warning and critical levels 
 used for inventorized checks. This is preset to {(10.0, 5.0)}.

oracle_tablespaces_check_autoext(bool): This boolean setting determines, whether 
 inventory should activate monitoring of the auto extension setting. Per default
 this is set to {True}, so the current state of the auto extension will be 
 put into the check parameters as either {True} or {False}. If you set the
 configuration variable to {False}, then inventory will enter {None} as 
 check parameter und thus disable the checking of the auto extensible flag
 for newly inventorized table spaces.

oracle_tablespaces_check_default_increment(bool): This setting does not 
 control inventory but is used live during the checking und thus affects
 all checks, not only newly inventorized ones. Per default it is set to
 {True}. That way the check will warn if the table space has its increment
 size set to {1} (the ORACLE default value).
