fhg
Volume 10, Number 17 -- May 26, 2010

Five Steps To Monitoring Your Server Log on IBM i

Published: May 26, 2010

by 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:

  • The *QSYSOPR system message queue
  • One or more e-mail addresses
  • Both the *QSYSOPR system message queue and e-mail addresses

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.
Bring up the IBM Web Administration for i by accessing the URL: http://:2001/HTTPAdmin. Click the Manage tab, then click sub-tab Application Servers. You'll see the link Web Log Monitor under the Problem Determination link in the left navigation panel. Click it and you'll see Web Log Monitor introduction page, as shown in Figure 1 below.


Figure 1. Web Log Monitor Intro Page.

Step 2. Specify the log that you need to monitor,
Click on the Enable Web Log Monitor link. Then browse to find and select the log file. Only log files that you're authorized to use will be shown in the pop-up browser window. Once you've selected the log file, click Next. Now you'll see the Configure Rule page.

Step 3. Define the filter rule for your log file.
You can either use the Basic tab (as seen in Figure 2 below) to define basic filter rules like matching keywords, or the Advanced tab (see Figure 3) to define more complex rules, such as regular expressions.


Figure 2. Web Log Monitor Rule Configuration Page, Basic Tab.


Figure 3. Web Log Monitor Rule Configuration Page, Advanced Tab.

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.

  • Match any keyword. For example, if the monitored file contains a line like "JVMDUMP0061 Processing Dump Event gpf, detail - Please Wait," and the keywords specified here are "Dump, Failed, Error," then the line is considered a match.
  • Match all keywords. For example, if the monitored file contains a line like "JVMDUMP0061 Processing Dump Event gpf, detail - Please Wait," and the keywords specified here are "Dump,Event, Wait," then this line is not considered a match since the white space or blank character in front of "Wait" is also treated as part of the keyword. If the specified keywords are "Dump,Event,Wait," then this line is considered a match, as all three specified keys are in the line.
  • Keyword A + any string + Keyword B. For example, if the monitored file contains a line like "JVMDUMP0061 Processing Dump Event gpf, detail - Please Wait," and the keywords specified here are "Dump" and "detail," then this line is considered a match.

The Advanced tab specifies complex patterns to be used in the rule:

  • Exclude the following keywords: Specifies whether or not to ignore a line that contains any of the following keywords.
  • Configure regular expression: Gives users the capability to customize the rule with a regular expression.

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.


Figure 4. Add multiple log files.

Step 4. Define where the notification text is sent when a match is found.
The next step is to tell Web Log Monitor what to do when it finds a match in your rules. You can do this by clicking on the Notification tab as show in Figure 5. Your choices are:

  • Send message to *QSYSOPR message queue. The notification text is sent to the *QSYSOPR system message queue when a match is found for a specified log file.
  • Send e-mail to a specific address. Notification is sent to the specified e-mail address. More than one e-mail address can be specified; use commas to separate multiple addresses.
  • Sender's e-mail address. Specifies the e-mail address used to send the notification.
  • SMTP server. Specifies the Simple Mail Transfer Protocol (SMTP) server used to send the mail notification.
  • Account. Specifies the account used to log on to the SMTP server.
  • Password. Specifies the password of the account used to log on to the SMTP server.

Figure 5. Notification tab.

Step 5. Specify monitor interval and maximum number of notifications.
The Miscellaneous tab shown in Figure 6 lets you specify an interval in minutes and the maximum number of notifications to be sent per hour to prevent notification flood.


Figure 6. Miscellaneous tab.

  • Monitor interval. Specifies the frequency of checking the log file. Set the interval to a small value when log files are updated frequently and a large value when the specified log files are updated infrequently.
  • Notification flood prevention. Specifies the maximum permitted number of notifications to be sent per hour to prevent notification flood. If the specified maximum number is exceeded, no notification will be sent even when a match is found.

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.


Sample Notifications

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.


Figure 7. *QSYSOPR message queue notification.

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.




                     Post this story to del.icio.us
               Post this story to Digg
    Post this story to Slashdot


Sponsored By
WORKSRIGHT SOFTWARE

Do you need area code information?
Do you need ZIP Code information?
Do you need ZIP+4 information?
Do you need city name information?
Do you need county information?
Do you need a nearest dealer locator system?

We can HELP! We have affordable AS/400 software and data to do all of the above. Whether you need a simple city name retrieval system or a sophisticated CASS postal coding system, we have it for you!

The ZIP/CITY system is based on 5-digit ZIP Codes. You can retrieve city names, state names, county names, area codes, time zones, latitude, longitude, and more just by knowing the ZIP Code. We supply information on all the latest area code changes. A nearest dealer locator function is also included. ZIP/CITY includes software, data, monthly updates, and unlimited support. The cost is $495 per year.

PER/ZIP4 is a sophisticated CASS certified postal coding system for assigning ZIP Codes, ZIP+4, carrier route, and delivery point codes. PER/ZIP4 also provides county names and FIPS codes. PER/ZIP4 can be used interactively, in batch, and with callable programs. PER/ZIP4 includes software, data, monthly updates, and unlimited support. The cost is $3,900 for the first year, and $1,950 for renewal.

Just call us and we'll arrange for 30 days FREE use of either
ZIP/CITY or PER/ZIP4.

WorksRight Software, Inc.
Phone: 601-856-8337
Fax: 601-856-9432
E-mail: software@worksright.com
Web site: www.worksright.com


Senior Technical Editor: Ted Holt
Technical Editor: Joe Hertvik
Contributing Technical Editors: Erwin Earley, Brian Kelly, Michael Sansoterra
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

Sponsored Links

IBS:  Free e-book: The Six Margin Killers in Wholesale Distribution
WorksRight Software:  ZIP codes, area codes, Canadian postal codes, CASS certification, and more
COMMON:  Join us at the Fall 2010 Conference & Expo, Oct. 4 - 6, in San Antonio, Texas


 

IT Jungle Store Top Book Picks

Easy Steps to Internet Programming for AS/400, iSeries, and System i: List Price, $49.95
The iSeries Express Web Implementer's Guide: List Price, $49.95
The System i RPG & RPG IV Tutorial and Lab Exercises: List Price, $59.95
The System i Pocket RPG & RPG IV Guide: List Price, $69.95
The iSeries Pocket Database Guide: List Price, $59.00
The iSeries Pocket SQL Guide: List Price, $59.00
The iSeries Pocket Query Guide: List Price, $49.00
The iSeries Pocket WebFacing Primer: List Price, $39.00
Migrating to WebSphere Express for iSeries: List Price, $49.00
Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
Getting Started with WebSphere Express for iSeries: List Price, $49.00
Can the AS/400 Survive IBM?: List Price, $49.00
Chip Wars: List Price, $29.95


 
The Four Hundred
Power7 Blades Plus i Versus X64 Blades Plus Windows

Transitions Push Systems and Technology Group into the Red

AS/400 LUG Shares Chief i Architect's "Why i?" Arguments

Creativity Is the New Business Kool-Aid, IBM CEO Study Finds

IBM Emphasizes 'Deeper Skills' in New Business Partner Program

Four Hundred Stuff
Security and Auditing Breakthrough Gives Cilasoft Compliance Advantage

DBU Now Accessible Over the Web

PowerTech Delivers Object-Based Control Over Exit Points

IBM Considers Offering Trials of RPG OA

Databorough Targets CA 2E Apps for Migration

Four Hundred Monitor
Four Hundred Monitor's
Full iSeries Events Calendar

System i PTF Guide
May 22, 2010: Volume 12, Number 21

May 15, 2010: Volume 12, Number 20

May 8, 2010: Volume 12, Number 19

May 1, 2010: Volume 12, Number 18

April 24, 2010: Volume 12, Number 17

April 17, 2010: Volume 12, Number 16

TPM at The Register
Cray-1 resurfaces in pieces on eBay

Novell puts Identity Management into beta

BMC reveals 'free money' mainframe and DB2 tools

Oracle shows off M9000s for data warehousing

Server rebound, Perot services boost Dell

NOAA goes to Cray for climate super

Cisco shells out $99m for CoreOptics

Oracle punts first VirtualBox x64 hypervisor

Novell seeks rich suitors

Oracle sneaks out carrier grade Sparc blade, Xeon rack

SUSE Linux 11 gets first service pack

IBM punts commercial Hadoop distro

THIS ISSUE SPONSORED BY:

WorksRight Software
SEQUEL Software
Botz & Associates, Inc.


Printer Friendly Version


TABLE OF CONTENTS
Five Steps To Monitoring Your Server Log on IBM i

Distinctly Speeding Up DISTINCT

Hey! What Happened To My Last Used Dates

Four Hundred Guru

BACK ISSUES




 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2010 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement