title: Check apply and transport lag of Oracle Data-Guard
agents: linux, aix
catalog: app/oracle
license: GPL
distribution: check_mk
description:
 This check monitors the apply and transport lag time
 on an ORACLE database. You can set warn/crit levels in seconds
 for apply lag and transport lag.

 The apply_lag_min is only useful when an apply lag is configured
 in Data Guard. Otherwise the apply lag is 0.

 This check only works on Enterprise Edition with Data Guard.

 The init.ora-Parameter log_archive_config must be configured.
 Oracle Enterprise Edition is required for Oracle Data-Guard.

 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:
 The SID of the database in uppercase (as appearing in the process
 name of the pmon_... process).

perfdata:
 One value: the current apply lag in seconds

[parameters]
parameters (dict):

 "apply_lag": (int, int) - Maximum time in seconds for the apply_lag
 in Data Guard. no default value

 "apply_lag_min": (int, int) - Minimum time in seconds for the apply_lag
 in Data Guard. no default value

 "transport_lag": (int, int) - Maximum time in seconds for the transport_lag
 in Data Guard. no default value

inventory:
 One separate check for each database found running will
 be created.

 checkgroup_parameters['oracle_dataguard_stats'] = [
  ( {'apply_lag': (10800, 21600)
   , 'transport_lag': (10800, 21600)}
   , [], ALL_HOSTS, ALL_SERVICES ),
