1.10 Integrating Health Check Results with Other Tools

You can integrate health check results from Oracle ORAchk and Oracle EXAchk into Enterprise Manager and other third-party tools.

1.10.1 Integrating Health Check Results with Enterprise Manager

Integrate health check results from Oracle ORAchk and Oracle EXAchk into Enterprise Manager.

With Oracle Enterprise Manager Cloud Control 13.1, Oracle ORAchk and Oracle EXAchk check results are also integrated into the compliance framework allowing you to display Compliance Framework Dashboards and browse checks by compliance standards.

See Also:

Although Oracle ORAchk and Oracle EXAchk do not require additional licenses, you require applicable Oracle Enterprise Manager licenses.

Enterprise Manager Licensing Information User Manual for more details.

1.10.2 Integrating Health Check Results with Third-Party Tool

Integrate health check results from Oracle ORAchk and Oracle EXAchk into various third-party log monitoring and analytics tools, such as Elasticsearch and Kibana by using Oracle ORAchk and Oracle EXAchk JSON output results.

Figure 1-126 Third-Party Tool Integration

Description of Figure 1-126 follows
Description of "Figure 1-126 Third-Party Tool Integration"
Oracle ORAchk and Oracle EXAchk create JSON output results in the output upload directory, for example:
Report_Output_Dir/upload/mymachine_orachk_results.json
Report_Output_Dir/upload/mymachine_orachk_exceptions.json
Report_Output_Dir/upload/mymachine_exachk_results.json
Report_Output_Dir/upload/mymachine_exachk_exceptions.json
Run the –syslog option to write JSON results to the syslog daemon, for example:
./orachk –syslog
./exachk –syslog

Note:

See Logging Alerts to the syslogd Daemon for more details about configure the types of messages to log and their output location.

Oracle ORAchk and Oracle EXAchk use the message levels: CRIT, ERR, WARN, and INFO.

Verify the syslog configuration by running the following commands:
$  logger -p user.crit crit_message
$  logger -p user.err err_message
$  logger -p user.warn warn_message
$  logger -p user.info info_message

Verify in your configured message location, for example, /var/adm/messages that each test message is written.

1.10.3 Integrating Health Check Results with Custom Application

Oracle ORAchk and Oracle EXAchk are capable of uploading collection results from multiple instances into a single database for easier consumption of check results across your enterprise.

You can either use Oracle Health Check Collections Manager or alternatively, use your own custom application to consume the results.

Upload the collection results into the following tables at the end of a collection:


Table 1-15 Uploading Collection Results into a Database

Table What Get’s Uploaded

rca13_docs

Full zipped collection results.

auditcheck_result

Health check results.

auditcheck_patch_result

Patch check results.


If you install Oracle Health Check Collections Manager, the these tables are created by the install script. If the tables are not created, use the following DDL statements:

  • DDL for the RCA13_DOCS table

    CREATE TABLE RCA13_DOCS   (
        DOC_ID        NUMBER DEFAULT to_number(sys_guid(),'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') NOT NULL ENABLE,
        COLLECTION_ID VARCHAR2(40 BYTE),
        FILENAME      VARCHAR2(1000 BYTE) NOT NULL ENABLE,
        FILE_MIMETYPE VARCHAR2(512 BYTE),
        FILE_CHARSET  VARCHAR2(512 BYTE),
        FILE_BLOB BLOB NOT NULL ENABLE,
        FILE_COMMENTS VARCHAR2(4000 BYTE),
        TAGS          VARCHAR2(4000 BYTE),
        ATTR1         VARCHAR2(200 BYTE),
        UPLOADED_BY   VARCHAR2(200 BYTE) DEFAULT USER,
        UPLOADED_ON TIMESTAMP (6) DEFAULT systimestamp,
        SR_BUG_NUM    VARCHAR2(20 BYTE),
        CONSTRAINT RCA13_DOCS_PK PRIMARY KEY (DOC_ID),
        CONSTRAINT RCA13_DOCS_UK1 UNIQUE (FILENAME)
      );
    
  • DDL for the auditcheck_result table

    create table
    auditcheck_result
    (
         COLLECTION_DATE TIMESTAMP NOT NULL ENABLE,
         CHECK_NAME VARCHAR2(256),
         PARAM_NAME VARCHAR2(256),
         STATUS VARCHAR2(256),
         STATUS_MESSAGE VARCHAR2(256),
         ACTUAL_VALUE VARCHAR2(256),
         RECOMMENDED_VALUE VARCHAR2(256),
         COMPARISON_OPERATOR VARCHAR2(256),
         HOSTNAME VARCHAR2(256),
         INSTANCE_NAME VARCHAR2(256),
         CHECK_TYPE VARCHAR2(256),
         DB_PLATFORM VARCHAR2(256),
         OS_DISTRO VARCHAR2(256),
         OS_KERNEL VARCHAR2(256),
         OS_VERSION NUMBER,
         DB_VERSION VARCHAR2(256),
         CLUSTER_NAME VARCHAR2(256),
         DB_NAME VARCHAR2(256),
         ERROR_TEXT VARCHAR2(256),
         CHECK_ID VARCHAR2(40),
         NEEDS_RUNNING VARCHAR2(100),
         MODULES VARCHAR2(4000),
         DATABASE_ROLE VARCHAR2(100),
         CLUSTERWARE_VERSION VARCHAR2(100),
         GLOBAL_NAME VARCHAR2(256),
         UPLOAD_COLLECTION_NAME VARCHAR2(256) NOT NULL ENABLE,
         AUDITCHECK_RESULT_ID VARCHAR2(256) DEFAULT sys_guid() NOT NULL ENABLE,
         COLLECTION_ID  VARCHAR2(40),
         TARGET_TYPE    VARCHAR2(128),
         TARGET_VALUE   VARCHAR2(256),
         CONSTRAINT "AUDITCHECK_RESULT_PK" PRIMARY KEY ("AUDITCHECK_RESULT_ID")
    );
    
  • DDL for the auditcheck_patch_result table

    create table
      auditcheck_patch_result
           ( COLLECTION_DATE     TIMESTAMP(6) NOT NULL,
              HOSTNAME            VARCHAR2(256),
              ORACLE_HOME_TYPE    VARCHAR2(256),
              ORACLE_HOME_PATH    VARCHAR2(256),
              ORACLE_HOME_VERSION VARCHAR2(256),
              PATCH_NUMBER NUMBER,
             CLUSTER_NAME VARCHAR2(256),
             DESCRIPTION         VARCHAR2(256),
             PATCH_TYPE VARCHAR2(128),
             APPLIED NUMBER,
             UPLOAD_COLLECTION_NAME VARCHAR2(256),
             RECOMMENDED NUMBER
             );
    

Store the connection details in an encrypted wallet using the –setdbupload option.

Oracle ORAchk and Oracle EXAchk –setdbupload all

Oracle Health Check Collections Manager upload configuration requires the connection string and the password to connect to the database where the collection results are uploaded.

Specify the connection details using the –setdbupload option. For default options, use –setdbupload all.
./orachk -setdbupload all
./exachk -setdbupload all

Oracle Health Check Collections Manager prompts you to enter the values for the connection string and password. Collection Manager stores these values in an encrypted wallet file.

Oracle ORAchk and Oracle EXAchk –getdbupload all

To see the values set in the wallet, use the –getdbupload option.
$ ./orachk –getdbupload
$ ./exachk –getdbupload

Oracle ORAchk and Oracle EXAchk can automatically use the default values set in the RAT_UPLOAD_USER and RAT_ZIP_UPLOAD_TABLE environment variables.

Oracle ORAchk and Oracle EXAchk –checkdbupload all

Verify if Oracle ORAchk and Oracle EXAchk makes successful connection to the database using the –checkdbupload option.
$ ./orachk –checkdbupload
$ ./exachk –checkdbupload

Example 1-9 Oracle ORAchk and Oracle EXAchk –setdbupload all

$ ./orachk -setdbupload all
Enter value for RAT_UPLOAD_CONNECT_STRING:(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver44.acompany.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orachkcm.acompany.com)))

Enter value for RAT_UPLOAD_PASSWORD:******

Database upload parameters successfully stored in orachk_wallet. orachk run will keep uploading the collections in database until it is unset using ./orachk -unsetdbupload all/env <variable name>

Note:

Use the fully qualified address (as in the example above) for the connect string rather than an alias from the tnsnames.ora file so that it is not necessary to rely on tnsnames.ora file name resolution on all the servers where the tool might be run.

Example 1-10 Oracle ORAchk and Oracle EXAchk –getdbupload all

$ ./orachk -getdbupload

RAT_UPLOAD_CONNECT_STRING = (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver44.acompany.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orachkcm.acompany.com)))

RAT_UPLOAD_PASSWORD = ******

RAT_UPLOAD_USER = ORACHKCM

RAT_ZIP_UPLOAD_TABLE = RCA13_DOCS

Example 1-11 Oracle ORAchk and Oracle EXAchk –checkdbupload all

$ ./orachk -checkdbupload

Configuration is good to upload result to database.

At the end of health check collection, Oracle ORAchk and Oracle EXAchk check if the required connection details are set (in the wallet or the environment variables). If the connection details are set properly, then Oracle ORAchk and Oracle EXAchk upload the collection results.

Tip:

To configure many Oracle ORAchk and Oracle EXAhk instances:

  1. Create the wallet once with the -setdbupload all option, then enter the values when prompted.

  2. Copy the resulting wallet directory to each Oracle ORAchk and Oracle EXAchk instance directories.

You can also set the environment variable RAT_WALLET_LOC to point to the location of the wallet directory.

Other configurable upload values are:
  • RAT_UPLOAD_USER:  controls which user to connect as (default is ORACHKCM).

  • RAT_UPLOAD_TABLE:  controls the table name to store non-zipped collection results in (not used by default).

  • RAT_PATCH_UPLOAD_TABLE:  controls the table name to store non-zipped patch results in (not used by default).

  • RAT_UPLOAD_ORACLE_HOME:  controls ORACLE_HOME used while establishing connection and uploading.

    By default, ORACLE_HOME is set to GI HOME discovered by Oracle ORAchk and Oracle EXAchk.

RCA13_DOCS:  is not configurable to use Oracle Health Check Collections Manager as this is the table Oracle Health Check Collections Manager looks for.

RAT_UPLOAD_TABLE and RAT_PATCH_UPLOAD_TABLE:  are not used by default because the zipped collection details are stored in RCA13_DOCS.

You only need to configure RAT_UPLOAD_TABLE and RAT_PATCH_UPLOAD_TABLE variable if you are using your own custom application to view collection results.

You can also set these values in the wallet, as follows:
$ ./orachk -setdbupload all
$ ./exachk -setdbupload all

This will prompt you for and set the RAT_UPLOAD_CONNECT_STRING and RAT_UPLOAD_PASSWORD, then use

$ ./orachk -setdbupload RAT_PATCH_UPLOAD_TABLE,RAT_PATCH_UPLOAD_TABLE
$ ./exachk -setdbupload RAT_PATCH_UPLOAD_TABLE,RAT_PATCH_UPLOAD_TABLE

Note:

Alternatively, you can set all values set in the wallet using the environment variables. If you’re setting the values using RAT_UPLOAD_CONNECT_STRING environment variable, then enclose the values in double quotes as follows:
export RAT_UPLOAD_CONNECT_STRING=”(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver.acompnay.com)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=myservice.acompany.com)))”

1.10.3.1 Viewing and Reattempting Failed Uploads

Use these procedures to view and reattempt to upload the failed uploads.

Values are stored in collection_dir/outfiles/check_env.out to record if the previous database upload was successful or not.

For example, this shows database upload has been setup, but the last upload was unsuccessful:
DATABASE_UPLOAD_SETUP=1
DATABASE_UPLOAD_STATUS=0

Oracle ORAchk and Oracle EXAchk -checkfaileduploads

To see failed collections, use the -checkfaileduploads option:
./orachk -checkfaileduploads
./exachk -checkfaileduploads
$ ./orachk -checkfaileduploads

List of failed upload collections
/home/oracle/orachk_myserver_042016_232011.zip
/home/oracle/orachk_myserver_042016_231732.zip
/home/oracle/orachk_myserver_042016_230811.zip
/home/oracle/orachk_myserver_042016_222227.zip
/home/oracle/orachk_myserver_042016_222043.zip

Oracle ORAchk and Oracle EXAchk -uploadfailed

To reattempt collection upload you can use the -uploadfailed option, specifying either all to upload all or a comma-delimited list of collections:
./orachk -uploadfailed all|list of failed collections
./exachk -uploadfailed all|list of failed collections
./orachk -uploadfailed "/home/oracle/orachk_myserver_042016_232011.zip, /home/oracle/orachk_myserver_042016_231732.zip"

Note:

You can not upload previously uploaded collections because of the SQL unique constraint.