Monitor the solution - Instance Scheduler on AWS

Monitor the solution

Logging and notifications

Instance Scheduler on AWS leverages Amazon CloudWatch Logs for logging. This solution logs processing information for each tagged instance, the results of the period evaluation for the instance, the desired state of the instance during that period, the applied action, and debugging messages. For more information, refer to Solution resources.

Warning and error messages are also published to a solution-created Amazon SNS topic, which sends messages to a subscribed email address. For details, refer to What is Amazon SNS? in the Amazon SNS Developer Guide. You can find the name of the Amazon SNS topic in the Outputs tab of the solution stack.

Log files

The Instance Scheduler on AWS creates a log group that contains the default AWS Lambda log files and a log group that contains the following log files:

  • InstanceScheduler-yyyymmdd: Logs general scheduler messages

  • SchedulingOrchestratorHandler-yyyymmdd: Logs general orchestration information for when scheduling executions are started

  • SchedulerSetupHandler-yyyymmdd: Logs the output of configuration actions

  • Scheduler-<service>-<account>-<region>-yyyymmdd: Logs scheduling activity in each service, account, and region

  • CliHandler-yyyymmdd: Logs requests from the admin CLI

  • Eventbus_request_handler-yyyymmdd: Logs the calls to the EventBus resources, if the solution is deployed to AWS organizations.

  • CollectConfigurationDescription-yyyymmdd : Logs configuration description metric data that is sent periodically

Operational insights dashboard

Instance Scheduler on AWS comes with an Operational Insights dashboard that allows you to monitor the operation of the solution and get insight into the running hours that have been saved by using this solution.

To use this dashboard, ensure that Operational Monitoring is set to "enabled" in the solution’s hub stack parameters in AWS CloudFormation. Then go to AWS CloudWatch and select "Dashboards" from the navigation menu. The dashboards name will be *{stack-name}-Operational-Insights-Dashboard*

The dashboard will display various operational metrics about the operations of your solution including counts of how many instances are currently being managed by the solution, information on when and how many instances are running throughout the day, and an estimation of how many running hours have been saved by shutting instances down. Sample data below:

Dashboard showing EC2 instance metrics

image9

EC2 instance schedules and RDS metrics showing controlled instances and hours saved

image10
Note

The information in these graphs is dependent upon the scheduling interval configured on the solution hub stack. When updating the solution’s scheduling interval, the dashboard will only display scheduling metrics from after the most recent update to the scheduling interval.

The dashboard also provides insight into the health of Lambda functions that are critical to the operation of the solution. If the average Lambda duration for any of the depicted Lambda functions begins to approach the yellow zone, it may be time to increase the Lambda size property on the solution hub stack.

Lambda duration graph showing timeout threshold and error count for multiple functions.

image11

Depicted: AsgHandler is raising consistent errors over multiple days. This indicates a potential problem with ASG scheduling and should prompt further investigation into the logs for that Lambda

Additional costs associated with this feature

This operational dashboard is powered by custom CloudWatch metrics collected by the solution that will incur additional cost. This feature can be turned off by disabling "Operational Monitoring" on the solution hub stack. This feature costs an additional $3.00/month plus additional scaling costs based on the size of your deployment. The costs are as follows:

Custom CloudWatch Dashboard $3

Per-schedule metrics

$0.60 per schedule*

Per-instance-type metrics

$0.90 per instance type*

API usage

~$0.10 per account/region

*These costs are tracked per service category (EC2/RDS) and only for schedules/instance types actually used for scheduling. For example, if you have 15 schedules configured, with three for RDS and five for EC2, the total cost will be $0.60 or $4.80/month. Inactive schedules will not be billed.