The following log files are to be monitored with the host agent:
To do this, you require log file templates, which specify which files are to be checked for which search patterns. There are two ways in which you can ensure that the log file agent finds these log file templates:
Logfile /usr/sap/tmp/sapccmsr/ORAALERTlogmon.iniLogfile /usr/sap/tmp/sapccmsr/DEV_Wxlogmon.ini Logfile /usr/sap/tmp/sapccmsr/SAPCCMSRlogmon.iniLogfile /usr/sap/tmp/sapccmsr/BACKUPSlogmon.ini
The contents of the log file templates mentioned above are shown in the following:
Oracle Alert Log
The template /usr/sap/hostctrl/work/ORAALERTlogmon.ini would have the following content:
LOGFILE_TEMPLATE DIRECTORY="/oracle/<SID>/saptrace/background" FILENAME="alert_<SID>.log" MTE_CLASS="ORAALERT" PATTERN_0="ORA-00600" VALUE_0=RED .
The log file agent searches through /oracle/<SID>/saptrace/background/alert_<SID>.log continuously for ORA-00600 messages and returns a red alert if a corresponding message is found:
Trace Files of the SAP Work Processes
The template /usr/sap/hostctrl/work/DEV_Wxlogmon.ini would have the following content:
LOGFILE_TEMPLATE DIRECTORY="/usr/sap/<SID>/<Instance name>/work" FILENAME="dev_w*" IGNORE_FILE="dev_w*.old"MTE_CLASS="WORKPROC"SHOWNEWLINES=1MONITOR_FILESIZE_KB=0PATTERN_0="ERROR" VALUE_0=RED PATTERN_1="core" VALUE_1=RED .
The log file agent searches through files /usr/sap/<SID>/<Instance name>/work/dev_w* continuously for ERROR and core messages and returns a red alert if it finds a matching message. Copies of the trace files, dev_w*.old, are not monitored.
A subtree is created in the Alert Monitor for every dev_w* file, so that there would be nine subtrees for nine work processes. The system also displays the size of the files and the number of lines reported per minute:
When the dev_w* files are recreated after a restart of the application server, the agent recognizes this using the file size and begins reading from the start of the files.
Log File of the SAP NetWeaver Management Host Agent
The template /usr/sap/hostctrl/work/SAPCCMSRlogmon.ini would have the following content:
LOGFILE_TEMPLATE DIRECTORY="/usr/sap/hostctrl/work" FILENAME="sapccmsr.log" MTE_CLASS="Log_of_sapccmsr"MONITOR_LAST_FILE_MODIF=1PATTERN_0="ERROR" VALUE_0=RED APPL_INFO_0="CCMS version"APPL_INFO_MTE_NAME_0="CCMS Version"APPL_INFO_1="compiled at"APPL_INFO_MTE_NAME_1="Compiled at"APPL_INFO_2="systemid"APPL_INFO_MTE_NAME_2="System ID"APPL_INFO_3="relno"APPL_INFO_MTE_NAME_3="Release"APPL_INFO_4="patch text"APPL_INFO_MTE_NAME_4="Patch Text"APPL_INFO_5="patchno"APPL_INFO_MTE_NAME_5="Patch Number"APPL_INFO_6="intno"APPL_INFO_MTE_NAME_6="internal number"APPL_INFO_7="running on"APPL_INFO_MTE_NAME_7="Host"APPL_INFO_8="pid"APPL_INFO_MTE_NAME_8="Process ID".
The log file agent searches through /usr/sap/hostctrl/work/sapccmsr.log continuously for ERROR messages and returns a red alert if it finds a matching message. The agent also displays the last change of the monitored log file.
The agent also searches for other search patterns to which no alert value is assigned and, if it finds one of these patterns, displays the corresponding line as the content of a separate text attribute. This means that a line that contains the search pattern CCMS version is displayed completely, so that you can see the associated version information in the corresponding subtree. If the search pattern exists at several places in the log file, the system displays the last line that contains the search pattern.
Log File for the Backups of an Oracle Database
The template /usr/sap/hostctrl/work/BACKUPSlogmon.ini would have the following content:
LOGFILE_TEMPLATE DIRECTORY="/oracle/OMA/sapbackup" FILENAME="*.ant"MONITOR_NEWEST_FILES=1 MTE_CLASS="BACKUPS" PATTERN_0="ERROR" VALUE_0=RED PATTERN_1="successfully" VALUE_1=GREEN .
The log file agent searches through the newest file of the format /oracle/OMA/sapbackup/*.ant continuously for ERROR messages and successfully messages and returns a red alert if it finds ERROR, or a green message if it finds successfully, meaning that the backup was successful.
The agent checks at regular intervals whether there are new matching files (in this case, therefore, whether a new backup has been started), automatically creates new subtrees when required, and deletes obsolete subtrees.