Refactoring: Moved more storage check parameters from unsorted.py to dedicated module...
[check_mk.git] / checkman / oracle_instance
blob82ce48ea03f5902ee4a12c1604c3e5825c1b28b7
1 title: Oracle Database Instance
2 agents: linux, aix, hpux, solaris, windows
3 distribution: check_mk
4 catalog: app/oracle
5 license: GPL
6 description:
7  This check monitors the state of an Oracle Instance. The check depends on
8  the state of the database.
10  The database must be a Primary Database and OPEN (startup in sqlplus) or
11  a Physical Standby Database and OPEN or MOUNTED. The state is CRITICAL when
12  this is not true.
14  The archive logmode, logging option, logins and uptime are also checked:
15  the state is WARNING when the Database is in NOARCHIVELOG or in ARCHIVELOG
16  and FORCE LOGGING is disabled. The state is CRITICAL when logins are not
17  possible.  This behaviour can be changed with rules.  The rule for logins
18  is only working when the connection is established with 'sysdba'. Otherwise
19  the rule for logins is always CRITICAL.
21  This check requires the new agent plugin mk_oracle from our plugin directory.
23  You can find a description for a basic configuration below. More details for
24  special setups will be available on the homepage of the Check_MK project.
25  https://mathias-kettner.de/checkmk_oracle.html
27  There are two configuration files important and stored in $MK_CONFDIR.
28  {sqlnet.ora} is a static file and is essential for the connection to the
29  database. It is also used to disable trace. Otherwise the oracle client
30  might create a lot of trace data in $HOME of the root user and may fill the
31  '/' filesystem.
33  Notes about CDB support in mk_oracle:
34  All PDBs from CDB change to pending state when CDB is not OPEN, to minimize
35  state changes for all instance checks. A '$' is removed in the service name.
36  pdb$seed is translated to pdbseed to prevent problems due to '$' in service
37  names. The check ignores the fact that the pdb$seed is in read only mode.
39  {mk_oracle.cfg} is the main configuration file for the plugin. Most
40  importantly, it contains the {credentials} for the connection to the
41  database. The ':' is used as a field separator in each line defining
42  the credentials. <sysdba>, <Host> and <Port> are optional: per default
43  <sysdba> is empty, Host=localhost and Port=1521. Host and Port depends on
44  the Listener configuration of the database.  DBUSER is used as a default for
45  all Instances on the Host. This default could be replaced for each Instance
46  with a DBUSER_<ORACLE_SID> entry. ASMUSER is a special entry for an Oracle
47  ASM Instance. ASM needs a 'sysdba' or 'asmsnmp' entry because this instance
48  is not OPEN. There is no ASMUSER_<ORACLE_SID> entry!
50  ASMUSER=<Username>:<Password>:<sysdba/asmsnmp>:<Host>:<Port>
52  DBUSER=<Username>:<Password>:<sysdba>:<Host>:<Port>
54  DBUSER_<ORACLE_SID>=<Username>:<Password>:<sysdba>:<Host>:<Port>
56  The configuration of a normal Instance is very easy. An example for ASM
57  follows afterwards below.
59  Example for nen CDB (old) databases:
61  sqlplus / as sysdba
63  create user check_mk identifiebd by checkmk;
65  grant connect, select_catalog_role to check_mk;
67  Example for CDB databases:
68  The prefix C## is only allowed in CDB environments. Don't use it for old
69  databases!
71  create user c##check_mk identified by "secret";
72  alter  user c##check_mk set container_data=all container = current;
73  grant create session, select_catalog_role to c##check_mk container=all;
76  An additional grant for a configuration to a Physical Standby Database is
77  mandatory when the Standby is not running in OPEN mode.  In most setups,
78  the Standby is running in MOUNT state requiring a 'SYSDBA' connection
79  due to the closed Data Dictionary. This grant is needed on the Primary as
80  well. Otherwise mk_oracle is not able to monitor the Instance after a role
81  change on the old Primary.
83  non CDB:
85  grant sysdba to check_mk;
87  CDB:
89  grant sysdba to c##check_mk;
91  Example for ASM:
93  An ASM Instance does not have a data dictionary. This is why a sysdba or
94  asmsnmp connection is required. Oracle changed the security in Release 11.1.
95  The connection with sqlplus must be carried out with 'as sysasm'. Older
96  versions are working like a normal Instance requiring a 'as sysdba'
97  connection. There is no requirement to create a new user for mk_oracle.
98  You cold use the existent default user asmsnmp.
100  sqlplus / as sysasm
102  create user check_mk identifiebd by checkmk;
104  grant sysdba to check_mk;
106  There is no ASM Instance Check at the moment. The configuration is needed
107  for the other checks.
109  More details can be found in the documentation in
110  https://mathias-kettner.de/checkmk_oracle.html
112 item:
113  ORA <ORACLE_SID> Instance