Use Amazon CloudWatch Logs
You can configure your SiteWise Edge gateway to send logs to CloudWatch Logs. For more information, see Enable logging for CloudWatch Logs in the AWS IoT Greengrass Version 2 Developer Guide.
To configure and access CloudWatch Logs (Console)
-
Navigate to the CloudWatch console
. -
In the navigation pane, choose Log groups.
-
You can find the AWS IoT SiteWise component logs in the following log groups:
-
/aws/greengrass/UserComponent/
– The logs for the SiteWise Edge gateway's component that collects data from the SiteWise Edge gateway's OPC UA sources.region
/aws.iot.SiteWiseEdgeCollectorOpcua -
/aws/greengrass/UserComponent/
– The logs for the SiteWise Edge gateway's component that publishes OPC UA data streams to AWS IoT SiteWise.region
/aws.iot.SiteWiseEdgePublisher
Choose the log group for the function to debug.
-
-
Choose a log stream that has a name that ends with the name of your AWS IoT Greengrass group. By default, CloudWatch displays the most recent log stream first.
-
To show logs from the last 5 minutes, do the following:
-
Choose custom in the upper-right corner.
-
Choose Relative.
-
Choose 5 minutes.
-
Choose Apply.
-
-
(Optional) To see fewer logs, you can choose 1m from the upper-right corner.
-
Scroll to the bottom of the log entries to show the most recent logs.