Virtual Machine
Last updated
Last updated
In the VM we'll look at how to set up dashboards in CloudWatch and add different kinds of widgets to them. This will demonstrate how the service can enable more effective monitoring in your cloud environment. We’ll finish by reading data from widgets to answer questions about activity in the account.
In the CloudTrail console, select the metrolio-management-trail.
In the CloudWatch Logs section, click on Edit. Enable CloudWatch logs with a new log group called metrolio-management-logs and use the existing IAM role MetrolioCloudWatchRole.
Navigate to the CloudWatch console and ensure you're in the the same region.
recommend changing the displayed timescale on dashboards to 30 minutes (select Custom, next to the options) and setting the Period Override to 1 minute (located in the Actions
Create a new CloudWatch dashboard and name it Metrolio-CloudTrail. On the Add widget screen, select Logs table. Select the log group you created for the CloudTrail.
Paste the query stats count(*) by eventSource, eventName, awsRegion over the pre-filled query in the box and Create widget, then Save Dashboard. You may be presented with red banner errors during this process, but you should still be able to complete all aspects of the task. It may take a couple of minutes for the information to be viewable in CloudWatch.
Navigate to the metrolio-overview dashboard in CloudWatch. Select Add widget (+ button on the top right) and create a Gauge widget. In the Browse tab, select the Lambda namespace; the metric should monitor across all functions and select the metric Throttles. In the Graphed metrics tab, change the statistic to Sum and Period to 1 minute. In the Options tab, set the range of the Gauge to be between 0 and 10. Click Create Widget. Then click Save dashboard.
Dashboard should look like this once saved
What's the name of the Lambda function that's generating errors?
Metrolio-Payroll
What's the name of the Lambda function that's taking over four seconds to run?
Metrolio-MachineLearner
By navigating to the Metrolio-MachineLearner log group, what is the serial being printed to the logs for the Metrolio-MachineLearner function?