Checkmk Extensions to monitor OPNsense using the API. The OPNsense Special Agent colltects data from the API enabling Checkmk to discover and monitor different aspects of OPNsense.
- OPNsense Firmware - Checks if updates are available and ensurche updates have ben checked for.
- OPNsense Business - Checks the remaining runtime of the business license.
- CARP - Checks the status of CARP and the VirtualIPs.
- VirtualIP - Can be configured to discover and check the status of individual VirtualIPs. Optionaly groubed by Interface.
- Gateway - Checks status and monitoring of gateways with monitoring enabled.
| Check | Priveleges | External Dependencies |
|---|---|---|
| firewall | page-system-login-logout, page-firewall-aliases | |
| firmware | page-system-firmware-manualupdate | |
| vip | page-status-carp | |
| gateway | page-system-gateways | |
| ipsec | page-vpn-ipsec-connections, page-status-ipsec | |
| unbound | page-services-unbound | |
| snapshot | page-snapshots | |
| ssl | page-system-certmanager | SSL-Certificates |
For the best development experience use VSCode with the Remote Containers extension. This maps your workspace into a checkmk docker container giving you access to the python environment and libraries the installed extension has.
The following directories in this repo are getting mapped into the Checkmk site.
$OMD_ROOT/local/lib/python3/cmk_addons/plugins/$PKGNAME
agent_based,graphing,lib,libexec,rulesetsandserver_side_callsare mapped intolocal/lib/python3/cmk_addons/plugins/opnsense
To build the package hit Crtl+Shift+B to execute the build task in VSCode.
pytest can be executed from the terminal or the test ui.
The provided Github Workflows run pytest and flake8 in the same checkmk docker conatiner as vscode.