

AWS Mainframe Modernization Service (Managed Runtime Environment experience) is no longer open to new customers. For capabilities similar to AWS Mainframe Modernization Service (Managed Runtime Environment experience) explore AWS Mainframe Modernization Service (Self-Managed Experience). Existing customers can continue to use the service as normal. For more information, see [AWS Mainframe Modernization availability change](https://docs.aws.amazon.com/m2/latest/userguide/mainframe-modernization-availability-change.html).

# Monitoring AWS Mainframe Modernization
Monitoring

Monitoring is an important part of maintaining the reliability, availability, and performance of AWS Mainframe Modernization and your other AWS solutions. AWS provides the following monitoring tools to watch AWS Mainframe Modernization, report when something is wrong, and take automatic actions when appropriate:
+ *Amazon CloudWatch* monitors your AWS resources and the applications you run on AWS in real time. You can collect and track metrics, create customized dashboards, and set alarms that notify you or take actions when a specified metric reaches a threshold that you specify. For example, you can have CloudWatch track CPU usage or other metrics of your Amazon EC2 instances and automatically launch new instances when needed. For more information, see the [Amazon CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/).
+ *Amazon CloudWatch Logs* enables you to monitor, store, and access your log files from Amazon EC2 instances, CloudTrail, and other sources. CloudWatch Logs can monitor information in the log files and notify you when certain thresholds are met. You can also archive your log data in highly durable storage. For more information, see the [Amazon CloudWatch Logs User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/).
+ *AWS CloudTrail* captures API calls and related events made by or on behalf of your AWS account and delivers the log files to an Amazon S3 bucket that you specify. You can identify which users and accounts called AWS, the source IP address from which the calls were made, and when the calls occurred. For more information, see the [AWS CloudTrail User Guide](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/).

# Monitoring AWS Mainframe Modernization with Amazon CloudWatch
Monitoring with CloudWatch

You can monitor AWS Mainframe Modernization using CloudWatch, which collects raw data and processes it into readable, near real-time metrics. These statistics are kept for 15 months, so that you can access historical information and gain a better perspective on how your web application or service is performing. You can also set alarms that watch for certain thresholds, and send notifications or take actions when those thresholds are met. For more information, see the [Amazon CloudWatch User Guide](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/).

The following tables list the metrics and dimensions for AWS Mainframe Modernization. The namespace for these metrics is `AWS/M2`.

## Runtime Environment Metrics



| Metric | Description | 
| --- | --- | 
|  CPUUtilization  |  The CPU utilization of instances in the environment. Dimension: environmentId Units: Percent Valid statistics: Average, Minimum, Maximum  | 
|  InboundNetworkThroughput  |  Inbound network throughput of instances in the environment. Dimension: environmentId Units: Bytes per second Valid statistics: Average, Minimum, Maximum  | 
|  MemoryUtilization  |  The memory utilization of instances in the environment. Dimension: environmentId Units: Percent Valid statistics: Average, Minimum, Maximum  | 
|  OutboundNetworkThroughput  |  Outbound network throughput of the instances in the environment. Dimension: environmentId Units: Bytes per second Valid statistics: Average, Minimum, Maximum  | 

## Application Metrics



| Metric | Description | 
| --- | --- | 
|  BatchJobCompletedCount  |  The number of completed jobs during the time interval. This metric is available for Rocket Software (formerly Micro Focus) and for AWS Transform for mainframe 3.7.0 and later releases. Dimension: applicationId Units: Count Valid statistics: Sum  | 
|  BatchJobFailedCount  |  The number of failed jobs during the time interval. This metric is available for Rocket Software and for AWS Transform for mainframe 3.7.0 and later releases. Dimension: applicationId Units: Count Valid statistics: Sum  | 
|  JvmMemoryFree  |  The amount of available memory that is not currently in use by the Java Virtual Machine. This metric is only available for the AWS Transform for mainframe runtime engine. It is available for AWS Transform for mainframe 3.7.0 and later releases. Dimension: applicationId Units: Bytes Valid statistics: Average, Minimum, Maximum  | 
|  JvmMemoryMax  |  The maximum amount of memory allowed for the Java Virtual Machine. This metric is only available for the AWS Transform for mainframe runtime engine. It is available for AWS Transform for mainframe 3.7.0 and later releases. Dimension: applicationId Units: Bytes Valid statistics: Average, Minimum, Maximum  | 
|  JvmMemoryUsed  |  The amount of memory actively used by the Java Virtual Machine. This metric is only available for the AWS Transform for mainframe runtime engine. It is available for AWS Transform for mainframe 3.7.0 and later releases. Dimension: applicationId Units: Bytes Valid statistics: Average, Minimum, Maximum  | 
|  ProcessesActiveCount  |  The active number of concurrent service execution processes that are processing requests. This metric is only available for the Rocket Software runtime engine. Dimension: applicationId Units: Count Valid statistics: Sum  | 
|  SessionCount  |  The number of HTTP sessions for the application. This metric is only available for the AWS Transform for mainframe runtime engine. It is available for AWS Transform for mainframe 3.7.0 and later releases. Dimension: applicationId Units: Count Valid statistics: Average, Minimum, Maximum  | 
|  SharedMemoryFree  |  The memory that is available for the enterprise server to store all the information it needs to run transactions and jobs. This metric is only available for the Rocket Software runtime engine. Dimension: applicationId Units: Kilobytes Valid statistics: Average, Minimum, Maximum  | 
|  SharedMemoryTotal  |  The total amount of shared memory allocated for the enterprise server to store all the information it needs to run transactions and jobs. This metric is only available for the Rocket Software runtime engine. Dimension: applicationId Units: Kilobytes Valid statistics: Average, Minimum, Maximum  | 
|  ThreadActiveCount  |  The number of engine threads that are processing requests. This metric is only available for the AWS Transform for mainframe runtime engine. It is available for AWS Transform for mainframe 3.7.0 and later releases. Dimension: applicationId Units: Count Valid statistics: Average, Minimum, Maximum  | 
|  TransactionCompletedCount  |  The number of committed transactions during the time interval. This metric is available for Rocket Software and for AWS Transform for mainframe 3.7.0 and later releases. Dimension: applicationId Units: Count Valid statistics: Sum  | 
|  TransactionFailedCount  |  The number of failed transactions during the time interval. This metric is available for Rocket Software and for AWS Transform for mainframe 3.7.0 and later releases. Dimension: applicationId Units: Count Valid statistics: Sum  | 
|  TransactionResponseTime  |  The amount of time from the moment that a user sends a request until the time that the application indicates that the request has been completed. This metric is available for Rocket Software and for AWS Transform for mainframe 3.7.0 and later releases. Dimension: applicationId Units: Milliseconds Valid statistics: Average, Minimum, Maximum  | 

## Dimensions



| Dimension | Description | 
| --- | --- | 
|  applicationId  |  This dimension filters the metric to the identified application by ID.  | 
|  environmentId  |  This dimension filters the metric to the identified environment by ID.  | 

# Logging AWS Mainframe Modernization API calls using AWS CloudTrail
Logging API calls with CloudTrail

AWS Mainframe Modernization is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in AWS Mainframe Modernization. CloudTrail captures all API calls for AWS Mainframe Modernization as events. The calls captured include calls from the AWS Mainframe Modernization console and code calls to the AWS Mainframe Modernization API operations. If you create a trail, you can enable continuous delivery of CloudTrail events to an Amazon S3 bucket, including events for AWS Mainframe Modernization. If you don't configure a trail, you can still view the most recent events in the CloudTrail console in **Event history**. Using the information collected by CloudTrail, you can determine the request that was made to AWS Mainframe Modernization, the IP address from which the request was made, who made the request, when it was made, and additional details.

To learn more about CloudTrail, see the [AWS CloudTrail User Guide](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/).

## AWS Mainframe Modernization information in CloudTrail


CloudTrail is enabled on your AWS account when you create the account. When activity occurs in AWS Mainframe Modernization, that activity is recorded in a CloudTrail event along with other AWS service events in **Event history**. You can view, search, and download recent events in your AWS account. For more information, see [Viewing Events with CloudTrail Event History](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html).

For an ongoing record of events in your AWS account, including events for AWS Mainframe Modernization, create a trail. A *trail* enables CloudTrail to deliver log files to an Amazon S3 bucket. By default, when you create a trail in the console, the trail applies to all AWS Regions. The trail logs events from all Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other AWS services to further analyze and act upon the event data collected in CloudTrail logs. For more information, see the following:
+ [Overview for creating a trail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail supported services and integrations](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html)
+ [Configuring Amazon SNS notifications for CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/configure-sns-notifications-for-cloudtrail.html)
+ [Receiving CloudTrail log files from multiple Regions](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html)
+ [Receiving CloudTrail log files from multiple accounts](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

All AWS Mainframe Modernization actions are logged by CloudTrail and are documented in the [AWS Mainframe Modernization API Reference](https://docs.aws.amazon.com/m2/latest/APIReference/). For example, calls to the `CreateApplication`, `CreateEnvironment` and `CreateDeployment` actions generate entries in the CloudTrail log files.

Every event or log entry contains information about who generated the request. The identity information helps you determine the following:
+ Whether the request was made with root user or user credentials.
+ Whether the request was made with temporary security credentials for a role or federated user.
+ Whether the request was made by another AWS service.

For more information, see the [CloudTrail userIdentity element](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html).

## Understanding AWS Mainframe Modernization log file entries


A trail is a configuration that enables delivery of events as log files to an Amazon S3 bucket that you specify. CloudTrail log files contain one or more log entries. An event represents a single request from any source and includes information about the requested action, the date and time of the action, request parameters, and so on. CloudTrail log files aren't an ordered stack trace of the public API calls, so they don't appear in any specific order. 

The following example shows a CloudTrail log entry that demonstrates the `CreateApplication` action.

```
{
    "eventVersion": "1.08",
    "userIdentity": {
        "type": "AssumedRole",
        "principalId": "AROAII6WZTHGYAEXAMPLE",
        "arn": "arn:aws:sts::444455556666:assumed-role/Admin/Mary_Major",
        "accountId": "444455556666",
        "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
        "sessionContext": {
            "sessionIssuer": {
                "type": "Role",
                "principalId": "AROAII6WZTHGYAEXAMPLE",
                "arn": "arn:aws:iam::444455556666:role/Admin",
                "accountId": "444455556666",
                "userName": "Admin"
            },
            "webIdFederationData": {},
            "attributes": {
                "creationDate": "2022-06-01T20:38:22Z",
                "mfaAuthenticated": "false"
            }
        }
    },
    "eventTime": "2022-06-01T20:40:39Z",
    "eventSource": "m2.amazonaws.com",
    "eventName": "CreateApplication",
    "awsRegion": "us-east-1",
    "sourceIPAddress": "72.21.196.65",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Firefox/91.0",
    "requestParameters": {
        "clientToken": "1abc23de-f45g-6789-h01i-jkl2m3456789",
        "name": "MyApp",
        "description": "",
        "engineType": "microfocus",
        "definition": {
            "content": "{}"
        },
        "tags": {}
    },
    "responseElements": {
        "applicationVersion": 1,
        "Access-Control-Expose-Headers": "x-amzn-RequestId,x-amzn-ErrorType,x-amzn-ErrorMessage,Date",
        "applicationArn": "arn:aws:m2:us-east-1:444455556666:app/lsfhmwhw7fffrosff2lncwqcua",
        "applicationId": "lsfhmwhw7fffrosff2lncwqcua"
    },
    "requestID": "36982d38-fcde-4bfe-a89a-7bd78d43c926",
    "eventID": "d7f0fc36-46ae-4157-9a79-c79f385fda98",
    "readOnly": false,
    "eventType": "AwsApiCall",
    "managementEvent": true,
    "recipientAccountId": "444455556666",
    "eventCategory": "Management"
}
```