Then, create the CloudWatch configuration file that specifies the metrics and logs for the agent to collect, including custom metrics. You can either manually create the configuration file, or use the wizard.
Select the answers to the wizard's questions based on your requirements. To set up instance monitoring, you can select the default choice for each answer. However for the following questions, choose the answer that's appropriate for your use case:
Are you using EC2 or On-Premises hosts?
Do you want to turn on StatsD daemon?
Do you want to monitor metrics from CollectD?
Do you want to monitor cpu metrics per core? Additional CloudWatch charges may apply.
Do you want to add ec2 dimensions (ImageId, InstanceId, InstanceType, AutoScalingGroupName) into all of your metrics if the info is available?
Do you want to monitor any log files?
Do you want to store the config in the SSM parameter store?
Note: If you can't see the metrics on the CloudWatch console, then check the log file at /opt/aws/amazon-cloudwatch-agent/logs/amazon-cloudwatch-agent.log for authentication or credential errors. For more information, see The CloudWatch Agent won't start.
After you configure the CloudWatch agent, you can find the metrics in the CloudWatch console, but not in the Lightsail dashboard.
View metrics in CloudWatch
To view the CloudWatch metrics, complete the following steps: