How to enhance CCDB with content from custom files

This document describes how to enhance the data collection of Advanced Configuration Monitoring with custom data of files. The following steps must be performed:

1.    Identify suitable CCDB table (ABAP Dictionary)

2.    Create a custom config store definition (CSA Administration – CSA Template Management)

3.    Perform SSI Setup

The following sections describe the above-mentioned steps in detail. For further questions please check the FAQ section at the end of the page.

CCDB Table

Step 1: Identify suitable CCDB table

Choose a CCDB table depending on the store type.
TEXT: As the lines of the files do not have a key we store the line number as key LINE and the lines content as TEXT, which corresponds to the use of table CCDB_DATA_010.
TABLE: In case a csv file should be stored as type TABLE (starting with FRUN 3.0 FP03) then you should use one of the generic table stores (CCDB_DATA_5*). For details, please refer to the section CCDB Table in How to enhance CCDB with database content from custom SQL.

Custom Template

Step 2: Create a Custom Config Store Template

  • As type TEXT

In the Focused Run system, a template for the new store collector item (SCI) must be created. Names of Custom Templates  must start with "Z". You can copy and change from an existing templates as starting point (e.g. store template SCI_ID=" S00034" of the config store "ABAP_START_PROFILE, which collects the content of a file (EC_OB_DEST_ID="DAGT_FS"). Adjust the sci_id, store name, paths of the copy:

The following changes must be applied to the new Z-Template:

SCI_ID = ‘Z<NNNNN>' und OBJVERS = ‘A' und SCI_DESC='<Description>'
START_COND="DAILY_HH"
STORE_NAME=”<STORE_NAME>” STORE_TYPE="TEXT"
              <Parameter NAME="check_type" VALUE="PATH"/>
              <Parameter NAME="name" VALUE="<filename>"/>
              <Parameter NAME="path" VALUE="<path>"/>
              <Parameter NAME="rootdir" VALUE="${TS_INST_PATH}"/>

In SCI_ID="S00034 the parameters are defined
<Parameter NAME="name" VALUE="START_${INSTANCE_ID_PATH}_${HOST_NAME}"/>
<Parameter NAME="path" VALUE="/SYS/profile"/>
<Parameter NAME="rootdir" VALUE="${TS_INST_PATH}"/>

For SCI_ID="S00034 a file with the name START_${INSTANCE_ID_PATH}_${HOST_NAME} is searched in path "/SYS/profile" of the Installation path ("${TS_INST_PATH}") and transferred to a config store ABAP_START_PROFILE of type TEXT.

The variable "${TS_INST_PATH}" will replaced during collection. The available variables TS_INST_PATH and INSTANCE_ID_PATH for file system paths in and their content is visible in the result of report Report COF_CIM_TREE_TS for which the input fields can be taken from the LMDB Object Maintenance.

 

  • CSV file as type TABLE 001

Besides of collecting of file information and store it as type TEXT starting with FRUN 3.0 FP03 it is possible to collect a file of type CSV and store it as type TABLE. For the CSV file the following rules are valid:

  1. separator , or ;
  2. One header line holding the column names separated by the separator. For a column name only capital letters A-Z and digits 0-9 and _ (not as first character) are allowed and at maximum 30 characters.
  3. as in data lines the content of fields is separated by the separator it is not allowed to have the separator in the content of the fields

An example looks like
NAME,VALUE
Para1,Value1
Para2,Value2
Para3,Value3

The store template looks like

<?xml version="1.0" encoding="utf-8"?>
<StoreCollectItems VERSION="">
  <StoreCollectItem APPL_ID="CCDB" MODIFIED="20210625115022" OBJVERS="A" SCI_DESC="DAGT_FS : CSV into TableStore" SCI_ID="Z00109">
    <Variant VARIANT_ID="01">
      <Condition>
        <SCVS/>
      </Condition>
      <CF>
        <EC COLL_DEST_ID="COLL_DAGT_00" EC_OB_CIM_CLASS="*" EC_OB_CIM_NTYP="TECHNICAL_SYSTEM" EC_OB_DEST_ID="DAGT_FS" EC_OB_PROP="" EC_RT_CIM_CLASS="*" EC_RT_SYSTEM_TYPE="ABAP" EC_RT_TYPE="TS"/>
        <EX EXTR_NAME="" EXTR_TYPE="SNAPSHOT" PRIORITY="5" START_COND="DAILY_HH" START_COND_EXT="" START_IMMEDIATE="X" TRANSFER_TYPE="LOCAL_IQ"/>
        <EXTR_XDATA_INPUT>
          <Supplier SUPPL_CONV="" SUPPL_INTF="" SUPPL_NAME="" SUPPL_PROTECT="N" SUPPL_TYPE="">
            <Store CARDINALITY="1" DDIC_COL_RENAME="" DDIC_TABLENAME="CCDB_DATA_001" GDATA_TYPE="" STORE_DEF_ID="01" STORE_NAME="FS_TABLE_BY_CSV" STORE_NAME_EXT="" STORE_TYPE="TABLE">
              <Parameter NAME="CCDB_CsvToTable" VALUE=""/>
              <Parameter NAME="check_type" VALUE="PATH"/>
              <Parameter NAME="name" VALUE="filename.csv"/>
              <Parameter NAME="path" VALUE="/"/>
              <Parameter NAME="rootdir" VALUE="${TS_INST_PATH}"/>
              <Parameter NAME="type" VALUE="TEXT"/>
            </Store>
          </Supplier>
        </EXTR_XDATA_INPUT>
      </CF>
    </Variant>
  </StoreCollectItem>
</StoreCollectItems>

FS_TABLE_BY_CSV stands for the config store name and filename.csv stands for the filename.

${TS_INST_PATH} is the placeholder for the installation path of the system and will be replaced during data collection. Of course the SCI_ID  "Z00109" has to be adjusted in custom template.

CCDB_DATA_001 is the table for key value pairs. 

 

  • CSV file as type TABLE Generic

If more columns involved another table has to be assigned and the columns described. For details, please refer to the section CCDB Table in How to enhance CCDB with database content from custom SQL.

E.g. the content of the csv file File_CSV_ToTableCommaSep.csv  for 10 columns (one Header line and three data lines) looks like:
HOST,HOST_ACTIVE,HOST_STATUS,FAILOVER_STATUS,FAILOVER_GROUP,NAMESERVER_CONFIG_ROLE,NAMESERVER_ACTUAL_ROLE,INDEXSERVER_CONFIG_ROLE,INDEXSERVER_ACTUAL_ROLE,STORAGE_PARTITION

ls6162,YES,OK,,default,MASTER 1,MASTER,WORKER,MASTER,1
ls6163,YES,OK,,default,MASTER 3,SLAVE,WORKER,SLAVE,2
ls6164,YES,IGNORE,,default,MASTER 2,SLAVE,STANDBY,STANDBY,0

The store template looks like:
<?xml version="1.0" encoding="utf-8"?>
<StoreCollectItems VERSION="">
  <StoreCollectItem APPL_ID="CCDB" MODIFIED="20220429062404" OBJVERS="A" SCI_DESC="DAGT_FS : CSV into TableStore" SCI_ID="Z00075">
    <Variant VARIANT_ID="01">
      <Condition>
        <SCVS/>
      </Condition>
      <CF>
        <EC COLL_DEST_ID="COLL_DAGT_00" EC_OB_CIM_CLASS="*" EC_OB_CIM_NTYP="TECHNICAL_SYSTEM" EC_OB_DEST_ID="DAGT_FS" EC_OB_PROP="" EC_RT_CIM_CLASS="*" EC_RT_SYSTEM_TYPE="ABAP" EC_RT_TYPE="TS"/>
        <EX EXTR_NAME="" EXTR_TYPE="SNAPSHOT" PRIORITY="5" START_COND="DAILY_HH" START_COND_EXT="" START_IMMEDIATE="X" TRANSFER_TYPE="LOCAL_IQ"/>
        <EXTR_XDATA_INPUT>
          <Supplier SUPPL_CONV="" SUPPL_INTF="" SUPPL_NAME="" SUPPL_PROTECT="N" SUPPL_TYPE="">
            <Store CARDINALITY="1" DDIC_COL_RENAME="" DDIC_TABLENAME="CCDB_DATA_501" GDATA_TYPE="ZGDATA_501_19" STORE_DEF_ID="01" STORE_NAME="FS_TABLE_BY_CSV" STORE_NAME_EXT="" STORE_TYPE="TABLE">
              <Parameter NAME="CCDB_CsvToTable" VALUE=""/>
              <Parameter NAME="CCDB_Generic_Column-01" VALUE="K-HOST-GCOL_02"/>
              <Parameter NAME="CCDB_Generic_Column-02" VALUE="D-HOST_ACTIVE-GCOL_10"/>
              <Parameter NAME="CCDB_Generic_Column-03" VALUE="D-HOST_STATUS-GCOL_11"/>
              <Parameter NAME="CCDB_Generic_Column-04" VALUE="D-FAILOVER_STATUS-GCOL_12"/>
              <Parameter NAME="CCDB_Generic_Column-05" VALUE="D-FAILOVER_GROUP-GCOL_13"/>
              <Parameter NAME="CCDB_Generic_Column-06" VALUE="D-NAMESERVER_CONFIG_ROLE-GCOL_14"/>
              <Parameter NAME="CCDB_Generic_Column-07" VALUE="D-NAMESERVER_ACTUAL_ROLE-GCOL_15"/>
              <Parameter NAME="CCDB_Generic_Column-08" VALUE="D-INDEXSERVER_CONFIG_ROLE-GCOL_16"/>
              <Parameter NAME="CCDB_Generic_Column-09" VALUE="D-INDEXSERVER_ACTUAL_ROLE-GCOL_17"/>
              <Parameter NAME="CCDB_Generic_Column-10" VALUE="D-STORAGE_PARTITION-GCOL_18"/>
              <Parameter NAME="check_type" VALUE="PATH"/>
              <Parameter NAME="name" VALUE="File_CSV_ToTableCommaSep.csv"/>
              <Parameter NAME="path" VALUE="/"/>
              <Parameter NAME="rootdir" VALUE="${TS_INST_PATH}"/>
              <Parameter NAME="type" VALUE="TEXT"/>
            </Store>
          </Supplier>
        </EXTR_XDATA_INPUT>
      </CF>
    </Variant>
  </StoreCollectItem>
</StoreCollectItems>

 

Remark: The names of the “CCDB_Generic_Column” have to fit to the columns names of the file.

SSI Setup

Step 3: Perform Simple System Integration (SSI) 

CCDB store template changes are triggered automatically down to the SDA's after changes have been done. The trigger should be completed for all systems within 1 hour. 

You can also trigger the Advanced Configuration Management (ACM) setup of the SSI manually in the CSA Administration by using the button ‘Setup'. For triggering an immediate update on the SDA, you have to select and setup systems one by one.

Waiting one hour or using the CSA Setup directly avoids a complete rerun of the SSI which is of course possible as well.