Is there any way to indicate a degraded state of greengrass component

0

When a greengrass component is running it goes into the RUNNING state, but is there any way to indicate any further status of the component. For exmaple if it was in some sort of degraded state, perhaps not all parts were functional etc ? Is there any way inside greengrass to report finer grained component status ?

asked a month ago40 views
1 Answer
1
Accepted Answer

While AWS IoT Greengrass doesn't have a specific "degraded" state for components, there are ways to indicate and monitor more detailed component statuses beyond just the RUNNING state.

For Lambda components, there is a health check ping mechanism (default interval of 1 minute). If the Lambda manager doesn't receive this ping, it transitions the Lambda to an ERRORED state. Greengrass will then attempt to retry the component 3 times within an hour. If it continues to fail, it will be marked as BROKEN.

For other component types, Greengrass v2.8.0 and later versions introduced more detailed component health status reporting. When a component enters a BROKEN or ERRORED state, the Greengrass nucleus now reports a component health status response that includes detailed error statuses. This allows for more granular information about the component's condition.

Additionally, Greengrass sends component status change events to Amazon EventBridge. These events can include states such as ERRORED, BROKEN, RUNNING, and FINISHED (for Greengrass nucleus versions 2.12.3 and later). You can set up EventBridge rules to monitor these status changes and take appropriate actions or send notifications.

While there isn't a built-in way to report a "degraded" state directly from within a component, you could implement your own health reporting mechanism within your component's code. This could involve periodically checking the component's internal state and using Greengrass APIs or custom metrics to report more fine-grained status information.

In summary, while Greengrass doesn't have a native "degraded" state, you can leverage the detailed error statuses, EventBridge notifications, and potentially implement custom health reporting to achieve more granular component status monitoring.

Sources
Component health status for pinned lambda functions running in Greengrass v2 | AWS re:Post
Get deployment and component health status notifications - AWS IoT Greengrass
Release: AWS IoT Greengrass Core v2.8.0 software update on October 7, 2022 - AWS IoT Greengrass

profile picture
answered a month ago
profile pictureAWS
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions