title: OPNsense: Gateway Status
agents: opnsense
catalog: os/networking
license: GPLv2
distribution: check_mk

description:
 This check monitors a gateway on an OPNsense firewall as seen by OPNsense's
 gateway monitoring (dpinger). The data is collected via the special agent
 {agent_opnsense} from the {routes/gateway/status} REST API endpoint.

 The service state follows the dpinger verdict: {Online} is {OK}, packet
 loss or high latency is {WARN}, an offline gateway is {CRIT}. The round
 trip time and packet loss are reported as metrics; optional own levels and
 the state per dpinger status can be set through the rule "OPNsense
 gateways". Gateways with monitoring disabled only report their status.

 The API user needs the "System: Gateways" privilege (it also allows
 editing the gateway configuration).

item:
 The gateway name as configured in OPNsense, for example {WAN_DHCP}.

discovery:
 One service {OPNsense Gateway NAME} is created for each gateway.
