seguro.commands.heartbeat_monitor.main¶
Functions
|
|
|
|
|
|
|
|
|
The callback fn triggered by the heartbeat to update the device params. |
|
|
|
Logic to calculate the maximum severity state and add remarks to be displayed per device on the web-ui. |
|
Landing page of the heartbeat monitor dashboard |
Classes
|
|
|
|
|
|
|
- class seguro.commands.heartbeat_monitor.main.AuthMiddleware(app, dispatch=None)[source]¶
Bases:
BaseHTTPMiddleware- Parameters:
app (ASGIApp)
dispatch (DispatchFunction | None)
- class seguro.commands.heartbeat_monitor.main.CpuThermal[source]¶
Bases:
TypedDict- critical: float¶
- current: float¶
- class seguro.commands.heartbeat_monitor.main.DevStatus(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
str,Enum- ALIVE = 'alive'¶
- ARCHIVED = 'archived'¶
- OFFLINE = 'offline'¶
- class seguro.commands.heartbeat_monitor.main.Device[source]¶
Bases:
TypedDict- cpu_thermal: CpuThermal¶
- disk_pct: float¶
- hb_interval: float¶
- id: str¶
- last_ping: str¶
- mem_available: float¶
- mem_pct: float¶
- ping_status: str¶
- remark: str¶
- state: str¶
- state_colour: str¶
- uptime: str¶
- class seguro.commands.heartbeat_monitor.main.Severity(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
IntEnum- CRITICAL = 2¶
- OK = 0¶
- WARNING = 1¶
- seguro.commands.heartbeat_monitor.main.handle_archive(event)[source]¶
- Parameters:
event (GenericEventArguments)
- seguro.commands.heartbeat_monitor.main.handle_view_json(event)[source]¶
- Parameters:
event (GenericEventArguments)
- seguro.commands.heartbeat_monitor.main.login(redirect_to='/')[source]¶
- Parameters:
redirect_to (str)
- Return type:
RedirectResponse | None
- seguro.commands.heartbeat_monitor.main.new_device_hb(logger, broker, msg)[source]¶
The callback fn triggered by the heartbeat to update the device params.
- Parameters:
logger (Logger)
broker (Client)
msg (Any)
- seguro.commands.heartbeat_monitor.main.state_calculator(curr_vals)[source]¶
Logic to calculate the maximum severity state and add remarks to be displayed per device on the web-ui.
- Parameters:
curr_vals (dict)