Skip to main content

health

Method
This is a method of the GatewayProtocol class in the protocols module.
Get gateway health status.

Signature

Returns

Dict[str, Any]
  • status: “healthy” or “unhealthy”
    • uptime: Seconds since start
    • agents: Number of registered agents
    • sessions: Number of active sessions
    • clients: Number of connected clients
    • reload: Optional :class:ReloadStatus dict (config hot-reload outcome + watcher liveness), when the gateway runs from a config file. See :class:ReloadStatus.
    • applied_config_revision: Optional stable revision id (see :func:compute_config_revision) of the config the gateway is actually running, comparable against the on-disk revision to detect drift.
    • pressure: Optional :class:HealthPressure dict (admission / inbound / outbound backlog + event-loop lag and a derived pressure classification), when the gateway runs back-pressure machinery. See :class:HealthPressure and :func:evaluate_pressure.

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 1085