Greengrass

Local logs

  • You can’t find local log files from Greengrass on your EC2 instance
  • Doublecheck that you have enabled logging to local log files in your Greengrass group.

Logs in Amazon CloudWatch

Greengrass

Greengrass should be configured for this workshop to send logs to Amazon CloudWatch. You will find logs groups from several Greengrass components like:

  • /aws/greengrass/GreengrassSystem/GGSecretManager
  • /aws/greengrass/GreengrassSystem/GGShadowService
  • /aws/greengrass/GreengrassSystem/GGShadowSyncManager
  • /aws/greengrass/GreengrassSystem/GGStreamManager
  • /aws/greengrass/GreengrassSystem/GGTES
  • /aws/greengrass/GreengrassSystem/runtime
  • /aws/greengrass/Lambda/eu-central-1/aws/swCollector
  • /aws/greengrass/Lambda/eu-central-1/aws/swPublisher

IoT Core

As Greengrass interacts with the AWS IoT Core you will find also logs in CloudWatch that relate to Greengrass activities. You can use CloudWatch Insights to analyze the logs.

Here is an example to analyze the interactions of your Greengrass core with AWS IoT Core.

Go to the Amazon CloudWatch console

  1. Insights
  2. Select log group(s)
  3. Check AWSIoTLogsV2
  4. Replace the query in the query field with the following statement
fields @timestamp, @message
| sort @timestamp desc
| limit 20
| filter clientId =~ "SiteWiseGroup_Core"
  1. Run query

You will find the last 20 entries from the IoT Core log groups where the clientId contains SiteWiseGroup_Core