AWS Mainframe Modernization applications are generally spread across multiple underlying instances for resiliency purpose. The logs generated from these instances are sent to separate Amazon CloudWatch log streams. This article explains how to view multiple logs as a combined single log at one place.
Overview
In a production scenario the AWS Mainframe Modernization environment in most case is deployed as a High availability cluster with multiple underlying instances. Online CICS transactions and batch jobs running within an AWS Mainframe Modernization application are executed on any of those instances. The application logs from the online transactions and batch jobs, and the server logs are sent to a specific CloudWatch log stream attached to the particular instance.
It is kind of inconvenient and time consuming to track and follow the logs at multiple CloudWatch log streams. However, using the Search log group or Live Tail feature of Amazon CloudWatch, you can view the logs at a single place.
Steps to view AWS Mainframe Modernization consolidated log
- Click on the link for Logs in the AWS Mainframe Modernization application Definition page. The Logs link is available when the application is in Running state.
Note: Below screen shots are for a AWS Blu Age refactored mainframe application.
- This opens the Amazon CloudWatch Log group page corresponding to the AWS Mainframe Modernization application There will be multiple Log streams depending on the number of instances running. Click on the Log stream links to view the logs for a particular instance. To view the consolidated logs from all log streams click on Search log group or Search all log streams menu button.
- Click on the
Calendar
icon to select the time period of the logs you want to view.
- Default option is Absolute, which allows you to select the specific data and time range. Click on the Relative menu to select date/time range relative to current timestamp.
- Select the relative time range you are interested, for example last 10 minutes.
- This will show the logs from the last relative time (10 minutes in this scenario). Click on the Refresh button to update the logs.
- To view the new logs as it appears (Tailing) click on the Start tailing menu button.
- The logs will appear on the screen as they are generated from different instances of the application. You many select to view only specific log streams or apply filter to view specific types of logs only. You may also choose the log display format by clicking
View in columns
or View in plain text
.
References:
[1] AWS Mainframe Modernization documentation
[2] Amazon CloudWatch log groups and log streams
[3] AWS Blue Age well-architected Workshop