Hitachi

JP1 Version 12 JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide


7.6.4 Notes on the Monitoring Log Files job

The following provides precautions (items you should know in advance) for using the Monitoring log files job.

For an overview of the operation of the Monitoring Log Files job, see 2.4.4(3) Executing a process at log file update (Monitoring log files job).

Cautionary notes
  • The Monitoring Log Files job requires the log file trapping function of JP1/Base.

  • The Monitoring Log Files job is executed using the log file trap functionality of JP1/Base. Before you execute the Monitoring Log Files job, start the log file trap management service of JP1/Base and the event service of JP1/Base.

    If the log file trap functionality and event service of JP1/Base are not running, the Monitoring Log Files job enters Now running status but does not actually monitor its target. The Monitoring Log Files job starts monitoring after the event service and the log file trap management service of JP1/Base have started.

    For details about the log file trap functionality, see the JP1/Base User's Guide.

  • Do not stop the log file trap management service or event service of JP1/Base while the Monitoring Log Files job is running. Also, do not execute the JP1/Base jevlogstop command to terminate the log file trap run by the Monitoring Log Files job. If you do, events might not be detected even if the log data of monitoring targets is written.

  • Each Monitoring Log Files job requires a share of memory, disk space, and system resources to make use of the log file trap functionality of JP1/Base.

    For details about estimating the resource requirements for JP1/Base, see the JP1/Base User's Guide.

  • Do not monitor log files that might be mounted or unmounted while a job is executed. If you monitor such files, monitoring might not operate normally, or the system might incorrectly assume that a new log file was created and read the file from the beginning.

  • When SEQ2 is selected as the output format for log files, if a file is renamed more than once during a file search interval, the acquired messages will be lost. For this reason, take care when specifying the file search interval.

    If you want to edit a file renamed during monitoring with SEQ2 set, edit it after a new file is created and the specified file search interval elapses.

    Figure 7‒18: Examples when acquired messages are lost and not lost with SEQ2 selected

    [Figure]

  • The Monitoring Log Files job cannot monitor the output formats of the following log files:

    - HTRACE

    - SEQ3

    - UPD

  • Make sure that the log files to be monitored by the Monitoring Log Files job are encoded in the character encoding that was specified for the system at the time when JP1/AJS3 started.

  • If you use version 06-00 to 06-71 of JP1/AJS2 - View to view the detailed definition of a job whose file output format is SEQ2, the file output format appears blank. At this time, if you click OK in the Detailed Definition dialog box, all the items defined as SEQ2 are re-defined as SEQ.

  • If you specify multiple Monitoring Log Files jobs that reference the same log file (including the syslog), the load on the system is increased by the increased number of accesses to the log file. In this case, we recommend that you use the log file trap management service of JP1/Base to define the operation of a single log file trap. Then use the JP1/Base JP1 event conversion facility to define a log file update as a JP1 event, and use the Receive JP1 Event job to monitor the created JP1 event.

  • As monitoring targets, do not specify log files that are accessed on network drives (for Windows) or the log files that are accessed by mounting a file system over a network such as NFS (for UNIX). JP1/AJS3 cannot monitor these files in the event of a network disconnection, and cannot determine whether such files are in use on another system.

  • Do not attempt to monitor the following files (if you do, monitoring might not work properly):

    - Special files and device files

    - Log files containing records with binary data except at the end character of one line

    - Files whose exact names are not known beforehand

  • If you are monitoring the scheduler log and execute ajsalter -c COPY during monitoring, monitoring will no longer work properly.

  • If the target log file is not found when log file monitoring starts, the job continues to search for the target log file until it is found. Therefore, log data that is written to the log file after monitoring starts but before the file is found could fall outside the scope of the Monitoring Log Files job.

  • When you execute a Monitoring Log Files job, you can specify an option that abnormally ends the job if the target file is not found. In this case, if the file is not found when monitoring starts, the Monitoring Log Files job ends without searching for the target file.

  • If you want to use extended regular expressions for items specified by regular expressions, specify the JP1/Base settings.

  • An item specified using a regular expression matches the condition if part of the specified character string matches. To require a full match, use a regular expression that explicitly specifies the full name. For information about the use of regular expressions in Windows, see the JP1/Base User's Guide. For information about regular expressions in UNIX, see your UNIX documentation.

    In Linux, which is a prerequisite for JP1/Base, Japanese characters cannot be processed in regular expressions used by the log file trapping function. Therefore, the JP1/AJS3 Monitoring Log Files job also handles two periods (..) as one Japanese character. For details about regular expressions, see the JP1/Base User's Guide.

  • You might want to execute the Monitoring Log Files job as a start condition for a job that uses an OR condition to trap multiple log data items. In this case, if log data written to the log file contains the specified log data items, the condition is satisfied multiple times for the same log entry. You can avoid this problem by using the AND, OR, and NOT operators as shown in the following example, so that the second and subsequent items are combined with all the prior items.

    To monitor Error, Warning, Information, and Notice, specify:

    lftpd="Error";

    lftpd="Warning":!"Error";

    lftpd="Information":!"Error":!"Warning";

    lftpd="Notice":!"Error":!"Warning":!"Information";

  • When you use a relative path to specify a log file, the current directory is assumed as follows.

    In Windows:

    system-folder\system32

    In UNIX:

    Directory where the jajs_spmd command is executed

  • In some cases, when several log file monitoring jobs are executed concurrently in Windows, a JP1/Base error message might be output and the jobs may end abnormally. If this occurs, refer to the JP1/Base User's Guide and take the appropriate corrective action for the JP1/Base error message.

  • If you run a Monitoring Log Files job on a host that runs an event server whose name is in FQDN format, enable the Event Server Name option (environment setting parameter EventServerName) in the configuration of JP1/AJS3 on the execution agent, and specify the event server name (FQDN format) of the event server used by the Monitoring Log Files job. For details about this procedure, see 6.3.17 Setting the event server name in the system using DNS in the JP1/Automatic Job Management System 3 Configuration Guide (for Windows) or 15.3.16 Setting the event server name in the system using DNS in the JP1/Automatic Job Management System 3 Configuration Guide (for UNIX).