SMART Box health model

An implementation of a health model for a Smartbox.

class SmartBoxHealthModel(health_changed_callback, logger, thresholds=None)

A health model for a smartbox.

__init__(health_changed_callback, logger, thresholds=None)

Initialise a new instance.

Parameters:
  • health_changed_callback (HealthChangedCallbackProtocol) – callback to be called whenever there is a change to this this health model’s evaluated health state.

  • logger (Optional[Logger]) – logger for this device

  • thresholds (Optional[dict[str, Any]]) – the threshold parameters for the health rules

evaluate_health()

Compute overall health of the smartbox.

The overall health is based on the monitoring points of the smartbox

Return type:

tuple[HealthState, str]

Returns:

an overall health of the smartbox

property health_params: dict[str, Any]

Get the thresholds for health rules.

Returns:

the thresholds for health rules

property intermediate_healths: dict[str, tuple[ska_control_model.HealthState, str]]

Get the intermediate health roll-up states.

Returns:

the intermediate health roll-up states

property use_new_health_rules: bool

A flag to represent if new healthRules are active.

Returns:

True if the new health rule is active.