Since I couldn't find a proper Zabbix template for the OPNsense API, I decided to create my own.Since I couldn't find a proper Zabbix template for the OPNsense API, I decided to create my own.
- IPsec: Phase 2 was previously requested via a GET request, even though the endpoint reads the connection via getPost('id'). This caused Phase 2 to remain empty for all systems – this is now fixed.
- CARP: CARP discovery resulted in an error on firewalls without CARP, even though an empty list is the correct response there.
- System: CPU utilization (split into user, system, and interrupt), memory, kernel network memory, mbuf clusters, netisr queues, swap space, and temperature.
- Performance: CPU load per core, clock synchronization, filesystems, and UPS status.
- Packet Filter (pf): State and source tracking tables including limits, pf counters, table entries, and the loaded ruleset with change detection.
- Network & Interfaces: Traffic, errors, link state, and blocked packets per interface, protocol errors, and gateways.
- VPN & Services: CARP, IPsec (including Phase 2 per connection), WireGuard, OpenVPN, system services status, Unbound DNS resolver, and DHCP leases.
- Security & Maintenance: Certificate expiration and firmware status.
- ... and much more!
The template is ready for Zabbix version 7.0 and higher. In my opinion, version 7.4 does not bring any significant advantages for this template. Therefore, I chose the LTS version 7.0 to ensure the highest possible compatibility.
I hope this template turns out to be useful for some of you!
https://github.com/Garfieldttt/opnsense-zabbix-template
(https://private-user-images.githubusercontent.com/182375156/640711402-dbf56df3-f940-4e6b-a916-604d9cc8a661.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODc2Mzk1MDMsIm5iZiI6MTc4NzYzOTIwMywicGF0aCI6Ii8xODIzNzUxNTYvNjQwNzExNDAyLWRiZjU2ZGYzLWY5NDAtNGU2Yi1hOTE2LTYwNGQ5Y2M4YTY2MS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwODI1JTJGdXMtZWFzdC0xJTJGczMl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