This document describes how to enhance the data collection of the Advanced Configuration Monitoring by using custom scripts on OS level and how to extend existing config stores in CCDB for such custom tailored content.
For loading custom-specific data from OS level scripts into CCDB, the operation system command interface DAGT_HA_EXE of the host agent can be used. Scripts provide the data in text format. FRUN CF allows to store the output in Configuration and Change Database (CCDB) directly as text or convert the output into a table format.
The following steps must be performed:
1. Create script and create a new conf-file for the SAP Host Agent
2. Identify suitable CCDB table (ABAP Dictionary)
3. Create a custom config store definition (CSA Administration – CSA Template Management)
4. Adapt the script
5. Perform SSI Setup
The sections below describe the above-mentioned steps in detail. For further questions please check the FAQ section at the end of this page.
The operation system script has to be created and tested in a customer specific directory in the SAPHostAgent, e.g.:
Figure: Path to an executable OS script (example)
In this example the script has the name “SRSM_CCDB_HdbSAPgenpse.sh”.
Now you create “<name>.conf” file in directory operations.d
Figure: Path of the Conf-file in the SAP Host Agent's directory structure
This “<name>.conf” contains the script specifications, for example:
Figure: Example of an OS command triggered by SAP Host Agent
The ResultConverter “flat” is mandatory for CCDB scripts.
The Collector Framework (FRUN CSA CF) can store the script output as text or convert it into a table format.
For storing the script output as text use table CCDB_DATA_010. All the output is stored in in a single field of the specified length.
Figure: Column structure of a CCDB Text Store (SE11)
To store script output as table you can choose either from the generic TableStores (recommended) or re-use a CCDB table with suitable table structure from the SAP standard. For details, please refer to document How to enhance CCDB with database content from custom SQL.
We usually recommend converting script output into a table format. This typically simplifies creation of check rules in the XML policies for validation later-on.
On the Focused Run system, a configuration item template must be created. Here, the name of the script and optional parameters required by the OS script are set. You can create a new SCI template and then copy and change from an existing templates as starting point.
The screenshot below is an example of an SCI template for a script extractor.
Figure: SCI template for a script extractor (example)
The following attributes must be maintained: In the header section specify the SCI Description SCI_DESC and the MODIFIED date
Take care of the following attributes:
Below the store definition, specify the parameters:
If store_type “TEXT” is used, then no activity to adapt the script is required. All output will be written to the text field of table CCDB_DATA_010.
If store_type “TABLE” is used, the script must deliver its data as a table stored in a json string. The json string contains of two parts, the field list and the table data. In addition, an exit code should be returned by the script.
Figure: Example of a JSON string for transferring data into a generic Table Store
The script itself should return an exitcode “0”, “1” or “2”:
0 = Correct
1 = Warning
2 = Error
For testing the script can be executed manually on OS level with the command:
Figure: Example command for executing a script
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 SSI manually for each system in the CSA Administration by running the Setup. For triggering an immediate update on the SDA, you have to select and setup systems one by one.
Note that scripts need to be distributed with non-SAP tools, since FRUN is currently unable to perform this step.
At this point no questions have been raised. Please be the first one or wait for other customer's questions.