Telemetry
- async OPNsenseClient.get_telemetry()
Return consolidated system telemetry from OPNsense.
- Returns:
- Mapping containing
mbuf, pfstate,memory,system,cpu,filesystems, andtempssections populated from the corresponding diagnostics endpoints. A missing inventory endpoint (404) supplies an empty list forfilesystemsor an empty mapping fortemps. Withthrow_errors=False, a denied or failed inventory read, undecodable body, or incorrect inventory container sets only its section toNone. Strict mode propagates request and decoding errors and preserves the existing handling of decoded bodies.
- Mapping containing
- Return type:
MutableMapping[str, Any]
- async OPNsenseClient.get_interfaces()
Return normalized interface status and counters.
- Returns:
- Mapping keyed by OPNsense interface
identifier. Each interface includes packet and byte counters, error counters, status, addresses, media, gateway and route metadata, MAC address, enabled flag, and VLAN tag when available. HTTP 404 returns an empty mapping. Forbidden reads, transient failures, and undecodable responses return
Nonewhenthrow_errorsis disabled and raise when enabled. A decoded body with the wrong shape returnsNonewhenthrow_errorsis disabled and an empty mapping when enabled.
- Return type:
MutableMapping[str, Any] | None
- async OPNsenseClient.get_gateways()
Return OPNsense gateway status details.
- Returns:
- Mapping keyed by gateway name, with each
gateway row preserved from OPNsense and
statusnormalized from the translated status when available. HTTP 404 returns an empty mapping. Other request or decoding failures returnNonewhenthrow_errorsis off and raise anOPNsenseErrorwhen it is on. Withthrow_errorsoff, a decoded response with a missing or invaliditemslist or a failed backend status also returnsNone.
- Return type:
MutableMapping[str, Any] | None