
CCMS agents are no longer required for purely SAPNetWeaver 7.1 landscapes; their functions are performed by SAP NetWeaver Management Agents. More information about when you still require CCMS agents for SAP NetWeaver 7.1: CCMS Agents: Central Monitoring for Components up to SAP NetWeaver 7.0.
One of the functions of CCMS agents is monitoring files. Originally created to monitor log files for particular search patterns (such as ERROR), the function was continually extended and now offers a large number of options for monitoring any files:
You can use the name and directory to determine which files are to be monitored. A separate subtree is created in the alert monitor for every file that fulfills this naming condition. If there are no files that match the naming condition, you can optionally have a corresponding alert generated.
You can search in any text files for text patterns. If the log file agent finds the search pattern, an alert is generated (you can define the properties of the alert, such as its color or severity, yourself), and the corresponding line of the monitored file is displayed in the alert monitor.
You can monitor the file size, and depending on the configuration, have an alert generated if the size rises above or falls below a defined threshold value. You can also monitor the period of time since the file was last changed.
You can restrict the file monitoring to particular week days, days, months, or times.
The results of the file monitoring are transferred to the central monitoring system with which the CCMS agent is registered, and may be displayed in the alert monitor (more information: Log File Monitoring Monitor). You can also adjust the properties of the nodes in the subtrees for file monitoring.
The file monitoring is especially suited to monitoring log files. You can monitor different types of log files:
With these files, the agent reads newly added entries and saves its last read position.
With these files, the agent reads newly added entries and saves its last read position. Due to the smaller size of the log file, it automatically recognizes the restart of an application and in this case starts reading from the start of the file again.
The agent reads newly added entries and saves its last read position. It automatically recognizes the newest log files of a type, so that the current log file can always be monitored.
File monitoring with CCMS agents was extensively revised and extended with Patch Collection 2007/6 of the CCMS agents. You should therefore make sure that you have an agent that has at least this status.
In general, a CCMS agent can only monitor those files that it has permission to read. Depending on the agent, the following condition must be fulfilled for this:
The configuration for file monitoring uses log file templates (more information: Structure of the Log File Templates of the Log File Agent). These log file templates contain parameters with which you can configure all of the above functions. There are two ways in which you can make sure that the CCMS agent reads the log file templates:
The log file agent independently and automatically identifies log file templates if they fulfill the following conditions:
| Agent | Naming Convention of the Log File Templates |
|---|---|
SAPCCMSR SAPCM3X |
*logmon.ini |
SAPCCMSR -j2ee |
*<SysID>_<InstNo>*logmon.ini |
SAPCCM4X |
*<SysID>_ABAP_<InstNo>*logmon.ini |
<SysID> and <InstNo> are the system ID and the instance number of the monitored ABAP or Java instance. The AS Java automatically generates suitable templates and stores these in the specified (cross-instance) directory. Since the shared memory of the CCMS agents SAPCCMSR -j2ee and SAPCCM4X are only to contain the log monitoring tree for the monitored Engine (ABAP or Java), system ID and instance number are part of the naming convention for the templates.
This ensures that each SAPCCMSR -j2ee agent only monitors the log files of its own Java instance. It also means that in the case of an ABAP+Java system, that the SAPCCM4X agent only monitors the log files of the associated ABAP instance.
| Agent | Directory of the Log File Templates |
|---|---|
SAPCCMSR -j2ee (up to SAP NetWeaver 7.0) |
UNIX: /usr/sap/ccms/<SysID>_<InstNo>/logmon Microsoft Windows: [drive]:\usr\sap\ccms\<SysID>_<InstNo>\logmon
|
SAPCCMSR -j2ee (for SAP NetWeaver 7.1) |
$DIR_LOGGING\logmon, that is, by default <instance directory>\log\logmon
|
SAPCCM4X |
$DIR_LOGGING\logmon, that is, by default <instance directory>\log\logmon
|
SAPCCMSR SAPCM3X |
UNIX: /usr/sap/tmp/logmon Microsoft Windows: [drive]:\usr\sap\prfclog\logmon
|
The second option is that you can specify the log file template in the SAPCCMSR.INI: Configuration File for the SAP Agents. Use the parameter LogFile to specify a log file template. SAPCCMSR.INI can contain multiple entries of the following format:
LogFile <full path/file name of log file template 1>LogFile <full path/file name of log file template 2>
The log file templates must be standard files (not links, for example), with a size no larger than 2 kilobytes in size (without comments).