Check Greengrass core device status - Amazon IoT Greengrass
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Check Greengrass core device status

Greengrass core devices report the status of their software components to Amazon IoT Greengrass. You can check the health summary of each device, and you can check the status of each component on each device.

Core devices have the following health statuses:

  • HEALTHY – The Amazon IoT Greengrass Core software and all components run without issue on the core device.

  • UNHEALTHY – The Amazon IoT Greengrass Core software or a component is in an error state on the core device.

Note

Amazon IoT Greengrass relies on individual devices to send status updates to the Amazon Web Services Cloud. If the Amazon IoT Greengrass Core software isn't running on the device, or if device isn't connected to the Amazon Web Services Cloud, then the reported status of that device might not reflect its current status. The status timestamp indicates when the device status was last updated.

Core devices send status updates at the following times:

  • When the Amazon IoT Greengrass Core software starts

  • When the core device receives a deployment from the Amazon Web Services Cloud

  • For Greengrass nucleus 2.12.2 and earlier, the core device sends status updates when the status of any component on the core device becomes ERRORED or BROKEN

  • For Greengrass nucleus 2.12.3 and later, the core device sends status updates when the status of any component on the core device becomes ERRORED, BROKEN, RUNNING, or FINISHED

  • At a regular interval that you can configure, which defaults to 24 hours

For Amazon IoT Greengrass Core v2.7.0 and later, the core device sends status updates when local deployment and cloud deployment occurs

Check health of a core device

You can check the status of individual core devices.

To check the status of a core device (Amazon CLI)
  • Run the following command to retrieve the status of a device. Replace coreDeviceName with the name of the core device to query.

    aws greengrassv2 get-core-device --core-device-thing-name coreDeviceName

    The response contains information about the core device, including its status.

Check health of a core device group

You can check the status of a group of core devices (a thing group).

To check the status of a group of devices (Amazon CLI)
  • Run the following command to retrieve the status of multiple core devices. Replace the ARN in the command with the ARN of the thing group to query.

    aws greengrassv2 list-core-devices --thing-group-arn "arn:aws-cn:iot:region:account-id:thinggroup/thingGroupName"

    The response contains the list of core devices in the thing group. Each entry in the list contains the status of the core device.

Check core device component status

You can check the status, such as lifecycle state, of the software components on a core device. For more information about component lifecycle states, see Develop Amazon IoT Greengrass components.

To check the status of components on a core device (Amazon CLI)
  • Run the following command to retrieve the status of the components on a core device. Replace coreDeviceName with the name of the core device to query.

    aws greengrassv2 list-installed-components --core-device-thing-name coreDeviceName

    The response contains the list of components that run on the core device. Each entry in the list contains the lifecycle state of the component, including how current the status of the data is and when the Greengrass core device last sent a message containing a certain component to the cloud. The response will also include the most recent deployment source that brought the component to the Greengrass core device.

    Note

    This command retrieves a paginated list of the components that a Greengrass core device runs. By default, this list doesn't include components that are deployed as dependencies of other components. You can include dependencies in the response by setting the topologyFilter parameter to ALL.