Five Steps To Monitoring Your Server Log on IBM i
May 26, 2010 Pi Guang Ming
In today’s Web application environment, notices and error messages that appear in a Web server’s logging files can be easily lost or missed. This exposes you to missing important information that you may need to know.
The Web Log Monitor gives users the capability to monitor the contents of log files for any Web-related server, including the Integrated Web Application Server, Integrated Web Services Server, WebSphere Application Server, WebSphere Portal Server, and IBM‘s HTTP Server.
Users can set rules for the Web Log Monitor. If a situation matches the rule parameters, the monitor sends a notification to:
In this way, the Web Log Monitor can help ensure that important messages are seen.
Web Log Monitor is included as a part of the IBM Web Administration for i Web Administration for i GUI interface. It inspects the log files as long as IBM Web Administration for i is started. The minimum OS supported is IBM i 6.1 at PTF SF99115 level 12 or higher.
Activating Web Log Monitor
You can configure and activate Web Log Monitor using following five steps.
Step 1. Open the Web Log Monitor main page.
Step 2. Specify the log that you need to monitor,
Step 3. Define the filter rule for your log file.
In the Basic tab, three modes of keyword rules filter the content of specified log file. To specify more than one keyword, use a comma or semicolon to separate them.
The Advanced tab specifies complex patterns to be used in the rule:
If you have multiple log files to monitor, click on the Add button in the File and Rule tab as shown in Figure 4. Then repeat step 3.
Step 4. Define where the notification text is sent when a match is found.
Step 5. Specify monitor interval and maximum number of notifications.
Note: Only users who have developer or higher authority can configure Web Log Monitor. For more information about roles, see User profile requirements to use the Web Administration for i interface.
Now that you’ve successfully enabled your Web Log Monitor, it will begin to send notifications according to your specifications. Figure 7 shows a sample of a *QSYSOPR message queue notification. The *QSYSOPR message queue notification contains related information such as the selected Web server’s instance name, time when this report is generated, and the full path of the monitored log file.
Below is a sample notification sent via an e-mail message. This e-mail contains related information such as the target server host name, target selected Web server’s instance name, time when this report is generated, full path of the monitored log file, rule configured, and the content quoted from log file. The keyword specified in the example is “unknown,” and all the lines containing the keyword are marked.
This mail is a notification generated by Web Log Monitor. Please do not reply this mail. Web Log Monitor on server [d60b85ae.cn.ibm.com] has detected the following problems: Web Log Monitor on server [d60b85ae.cn.ibm.com] has detected the following problems: ******** Web Log Monitor Report ******** * Server instance = stopIAS * Time = Mon Aug 17 16:58:58 CST 2009 ======== Log File ======== * File : /www/stopIAS/lwi/logs/lwistderr.txt * Rule : .*(unknown).* * Message : File /www/stopIAS/lwi/logs/lwistderr.txt has something to be aware of. -------- Message 0 -------- > 2009/08/14 13:53:10.834 CONFIG eclipse.buildId=@buildId@ > java.fullversion=J2RE 1.6.0 IBM J9 2.4 OS400 ppc-32 jvmap3260sr3-20081105 (JIT enabled, AOT enabled) > J9VM - 20081105_025433_bHdSMr > JIT - r9_20081031_1330 > GC - 20081027_AB X -- > BootLoader constants: OS=unknown > , ARCH=PowerPC X -- > , WS=unknown > , NL=en_US > Framework arguments: -pluginCustomization rcp/plugin_ customization.ini -application com.ibm.lwi.application. LWIApplication > Command-line arguments: -pluginCustomization rcp/plugin_ customization.ini -data /www/stopIAS/lwi/runtime/core/ workspace/ -application com.ibm.lwi.application.LWIApplication -console -clean ::class.method=com.ibm.rcp.core.internal.logger. frameworkhook.writeSession() ::thread=Start Level Event Dispatcher ::loggername=com.ibm.rcp.core.internal.logger. frameworkhook ******** End of Web Log Monitor Report ********
Never Miss a Message
Web Log Monitor helps ensure you never miss an important message again. By configuring Web Log Monitor to generate a *QSYSOPR notification or an e-mail, you can stay on top of your notices and errors.
Pi Guang Ming is a software engineer for IBM’s i Web integration development team at the China System and Technology Lab. The i Web integration development team’s focus is on the Web-based management of middleware running on i, including WebSphere Application Server, WebSphere Portal Server, Integrated Web Services Server, Integrated Application Server, and the i HTTP server. Send your questions or comments for Pi to Ted Holt via the IT Jungle Contact page.