health_monitor


Overview

The health_monitor application monitors the health status of various controllers and listens for emergency status changes. The app logs health status changes and emergency button presses. It provides real-time updates on the health status of the controllers and can warn the user when health issues are detected.

Execution

The application can be executed with the following command:

python3 health_monitor/ --auto-run

Inputs

  • –auto-run: Automatically runs the application upon startup.

Outputs

  • Logs the status of each controller when its health status changes.

  • Logs emergency button presses along with the affected components.

Behavior

  • The application monitors and logs health status changes for controllers.

  • When the health status of a controller changes, the app logs the controller name and its new health status.

  • The app listens for emergency button presses and logs any such events.

  • The app continuously monitors until it is manually stopped by the user.

Example Output

# python3 health_monitor/ --auto-run
[INFO] [timestamp] [pyraya.health_monitor]: Application started
[WARNING] [timestamp] [pyraya.health_monitor]: Controller 'sound' changed its health status to 'unhealthy'
[WARNING] [timestamp] [pyraya.health_monitor]: Emergency status! Button: Pressed, components: ['motion', 'navigation']
[INFO] [timestamp] [pyraya.health_monitor]: Application finished!