Automated deployment - Machine Downtime Monitor on AWS

Automated deployment

Before you launch the solution, review the cost, architecture, components, security, and design considerations discussed in this guide. Follow the step-by-step instructions in this section to configure and deploy the solution into your account.

Time to deploy: Approximately five minutes

Prerequisites

In order for this solution to perform real-time monitoring and analyses, you must connect your machine data to this solution. You can do this in one of two ways:

  1. Connect your data generator machine on-premises to Amazon Kinesis Data Streams. If you need assistance to do this, you can request help from an AWS IQ expert.

  2. Deploy the Machine to Cloud Connectivity Framework solution implementation (version 2.2.0 or later).

    • If you already have Machine to Cloud Connectivity Framework deployed, you can configure it to send data to the Machine Downtime Monitor Kinesis data stream by updating the Machine to Cloud Connectivity Framework solution’s stack and setting the value for the ExistingKinesisStreamName parameter to be the Kinesis data stream created by Machine Downtime Monitor on AWS. Locate the stream name in the Outputs tab of your Machine Downtime Monitor stack.

    • If you do not have Machine to Cloud Connectivity Framework deployed, you can choose to deploy it as part of Machine Downtime Monitor by selecting Yes for the Deploy Machine to Cloud Connectivity Framework solution parameter. This results in the Machine to Cloud Connectivity Framework solution being deployed as a nested CloudFormation stack. Note that the Machine to Cloud Connectivity Framework solution requires configuration. For more information, refer to the Implementation Guide.

Data Analysis

This solution can automatically create a QuickSight analysis and dashboard if you are an Amazon QuickSight Enterprise Edition subscriber.

If you do not have QuickSight Enterprise Edition, this solution processes raw data using AWS Glue and makes it available for analysis regardless of your QuickSight edition and Amazon Athena. For more information about creating QuickSight analyses and dashboards manually, refer to Creating an Analysis in the QuickSight User Guide.

Note

You have the option to use your own visualization tool to visualize the processed data.

Deployment overview

Use the following steps to deploy this solution on AWS. For detailed instructions, follow the links for each step.

Step 1. Launch the stack

  • Launch the AWS CloudFormation template into your AWS account.

  • Enter the email address for the default dashboard user.

  • Review the other template parameters, and adjust if necessary.

Step 2. Configure the message format

Step 3. Access the dashboard

Step 4. Configure the dashboard

Step 1. Launch the stack

This automated AWS CloudFormation template deploys Machine Downtime Monitor on AWS.

Note

You are responsible for the cost of the AWS services used while running this solution. For more details, visit the Cost section in this guide, and refer to the pricing webpage for each AWS service used in this solution.

  1. Sign in to the AWS Management Console and select the button to launch the machine-downtime-monitor-on-aws AWS CloudFormation template.

    
              Machine Downtime Monitor on AWS solution launch button

    Alternatively, you can download the template as a starting point for your own implementation.

  2. The template launches in the US East (N. Virginia) Region by default. To launch the solution in a different AWS Region, use the Region selector in the console navigation bar.

  3. On the Create stack page, verify that the correct template URL is in the Amazon S3 URL text box and choose Next.

  4. On the Specify stack details page, assign a name to your solution stack. For information about naming character limitations, refer to IAM and STS Limits in the AWS Identity and Access Management User Guide.

  5. Under Parameters, review the parameters for this solution template and modify them as necessary. This solution uses the following default values.

    Parameter Default Description
    Email for the Default Dashboard User <Requires input> Enter the email address for the default dashboard user. This user profile is created in the solution’s Amazon Cognito user pool. An auto-generated email is sent containing a link to the solution’s dashboard and a temporary password to sign in.
    Deploy Machine to Cloud Connectivity Framework No Specifies whether to deploy the Machine to Cloud Connectivity Framework solution. By default, this solution is not deployed. Select Yes to deploy the solution as a nested CloudFormation template, which is configured to send data to the Machine Downtime Monitor on AWS Kinesis data stream.
    ID of the Existing AWS IoT Greengrass Group <Optional input> Determines whether this solution generates new AWS IoT Greengrass resources or use your existing AWS IoT Greengrass group. If you are using AWS IoT Greengrass v1.0, you can use this group by specifying the ID. You can find the ID using either the AWS Management Console or the AWS CLI. For example, 1234a5b6-78cd-901e-2fgh-3i45j6k178l9.
    QuickSight User Principal ARN <Optional input>

    The Amazon QuickSight User Principal ARN is used to create QuickSight resources. Supply an ARN only if you have QuickSight Enterprise Edition and would like Machine Downtime Monitor to create a QuickSight dashboard for you. You can find the QuickSight User Principal ARN using the AWS CLI.

    For example, arn:aws:quicksight:us-east-1:YOUR_ACCOUNT_ID:user/default/USER_NAME.

  6. Choose Next.

  7. On the Configure stack options page, choose Next.

  8. On the Review page, review and confirm the settings. Check the box acknowledging that the template creates AWS Identity and Access Management (IAM) resources.

  9. Choose Create stack to deploy the stack.

You can view the status of the stack in the AWS CloudFormation Console in the Status column. You should receive a CREATE_COMPLETE status in approximately five minutes.

Note

In addition to the primary AWS Lambda functions, this solution includes the solution-helper Lambda function, which runs only during initial configuration or when resources are updated or deleted.

When you run this solution, you will notice all Lambda functions in the AWS Management Console but solution-helper will not be active unless you are creating, updating, or deleting the solution’s stack. You must not delete the solution-helper function, because it is necessary to manage associated resources.

Step 2. Configure the message format

Machine data sent by the Machine to Cloud Connectivity Framework solution has a pre-defined asset hierarchy, for example, factory/area/line/machine/tag, also identified as the attribute. By default, Machine Downtime Monitor on AWS uses this message format configuration to parse messages from the Amazon Kinesis data stream. If you are not using the Machine to Cloud Connectivity Framework solution to send data to the Kinesis data stream, you can update the message format configuration by editing the item in the Config DynamoDB table (id=’DEFAULT’, type=’MESSAGE_FORMAT’). After the configuration is updated, machine information displays in the solution’s dashboard. Machine information can be configured in the dashboard, as detailed in Step 4 in the Automated deployment section.

Figure 7 shows how the attributes for the MESSAGE_FORMAT configuration item is used to parse a machine data message. The JSON format on the right shows an example of a message that follows the structure used by the Machine to Cloud Connectivity Framework solution.


          MESSAGE_FORMAT configuration

Figure 7: MESSAGE_FORMAT configuration

Step 3. Access the dashboard

This solution provides for one default user to access the dashboard. This user is assigned during deployment of the AWS CloudFormation template by providing an email address in the Email for the Default Dashboard User parameter. This email address is used to create a user in the solution’s Amazon Cognito user pool. After the solution successfully deploys, the assigned user receives an email containing the link to the dashboard and a temporary password. An Amazon Cognito identity pool is used to grant authenticated users the permission to invoke the solution’s API.

When the assigned user first signs in to the dashboard, a new password must be created. Once successfully logged in, the user can configure the dashboard.

Step 4. Configure the dashboard

If this solution is receiving machine data, the dashboard will display machines on the home screen. To view the status of the machines, you must configure them in the dashboard.

Note

If there is a message on the home screen indicating that there is no data available, ensure data is being sent to the solution’s Amazon Kinesis data stream. For information, refer to Empty state in the Design considerations section.

Configure the machines

Use the Configure the tags/data attributes for your machines page to map machine tags (data attributes reported by machines) for status and production count. Use the following steps to:

  • Set up the values that identifies a machine’s status including UP, DOWN, or IDLE.

  • Assign a display name for each machine for easier identification on the dashboard.

Once the dashboard is configured, machine status updates automatically as machine data is ingested into the Kinesis data stream.

  1. From the dashboard home screen, select the configure machine button ( the icon with three vertical dots) in the top-right corner of the machine’s tile.

  2. On the Configure Machine page, do the following:

    1. In the Name of tag for production count field, enter a tag name.

    2. In the Name of tag for machine status field, enter a tag status.

    3. In the Map your machine status section, enter a value for each machine status: UP, DOWN, or IDLE.

      Note

      If you want the machine to report multiple values that can be interpreted as UP, DOWN, or IDLE, you can enter them as a comma-separated list.

    4. (Optional) In the Machine name field, enter a display name.

  3. Choose Save.

    Dashboard showing the machine configuration page

    Figure 8: Dashboard showing the machine configuration page

Once saved, the next status message sent to the Amazon Kinesis data stream for that machine will result in the status being updated in the dashboard. If you enter a machine name, the name will be reflected immediately.

(Optional) Set up machine groupings

You can set up machine groupings in the dashboard to organize where machines are placed. The dashboard has two grouping levels: Location and Line. The hierarchy in machine IDs are used to create these groupings. The machine grouping configuration can be accessed by selecting the gear icon in the top-left of the page.

Machine grouping configuration

Figure 9: Machine grouping configuration

As shown in Figure 9, the machine ID (East/Floor 1/Line 1/Sample 1) is parsed into East, Floor 1, and Line 1. These IDs are used as options for defining the Location and Line groupings. Once the groupings are set, the configuration is applied to all machines.

Figure 10 shows the resulting dashboard screen after a grouping is configured. Locations can be changed by selecting a new location from the drop down menu in the top-left corner of the page. The next breakdown shows the Lines in each location and their associated machines.

Sample dashboard showing a machine grouping

Figure 10: Sample dashboard showing a machine grouping