Module fuchsia_inspect::health

source ·
Expand description

§Health-checking inspect node.

Health installs a health checking inspect node. This node reports the current program’s health status in the form of an enumeration string and, in case of an unhealthy status, a free-form message.

Possible statuses are as follows:

  • OK, the Node is HEALTHY
  • STARTING_UP, the node is not yet HEALTHY
  • UNHEALTHY, the node is NOT HEALTHY (the program is required to provide a status message).
  • any other value, the node is NOT HEALTHY.


To use the health checker one must first obtain a fuchsia_inspect::Node to add the health information into. Once that is available, use fuchsia_inspect::health::Node::new(...) to add a standardized health checker.


use fuchsia_inspect as inspect;
use fuchsia_inspect::health;

let inspector = /* the inspector of your choice */
let mut root = inspector.root();  // Or perhaps a different Inspect Node of your choice.
let mut health = health::Node::new(root);

// ...
health.set_unhealthy("I am not feeling well."); // Report an error
// ...
health.set_ok(); // The component is healthy again.


  • Contains subsystem health information. A global instance of Health is used implicitly if the user calls the functions init(), ok() and unhealthy(...).


  • A trait of a standardized health checker.