Available solutions
OPNsense by SNMP
Overview
Template for monitoring OPNsense by SNMP
Requirements
Zabbix version: 8.0 and higher.
Tested versions
This template has been tested on:
- OPNsense 22.1.9, 25.1
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable bsnmpd daemon by creating new config file "/etc/rc.conf.d/bsnmpd" with the following content: bsnmpd_enable="YES"
- Uncomment the following lines in "/etc/snmpd.config" file to enable required SNMP modules: begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so" begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so"
- Start bsnmpd daemon with the following command: /etc/rc.d/bsnmpd start
- Setup a firewall rule to get access from Zabbix proxy or Zabbix server by SNMP (https://docs.opnsense.org/manual/firewall.html).
- Link the template to a host.
Macros used
| Name | Description | Default |
|---|---|---|
| {$IF.ERRORS.WARN} | Threshold of error packets rate for warning trigger. Can be used with interface name as context. |
2 |
| {$IF.UTIL.MAX} | Threshold of interface bandwidth utilization for warning trigger in %. Can be used with interface name as context. |
90 |
| {$IFCONTROL} | Macro for operational state of the interface for link down trigger. Can be used with interface name as context. |
1 |
| {$NET.IF.IFADMINSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.* |
| {$NET.IF.IFADMINSTATUS.NOT_MATCHES} | Ignore down(2) administrative status. |
^2$ |
| {$NET.IF.IFALIAS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFALIAS.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFDESCR.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFDESCR.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFNAME.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
(^pflog[0-9.]*$|^pfsync[0-9.]*$) |
| {$NET.IF.IFOPERSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.*$ |
| {$NET.IF.IFOPERSTATUS.NOT_MATCHES} | Ignore notPresent(6). |
^6$ |
| {$NET.IF.IFTYPE.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFTYPE.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$SNMP.TIMEOUT} | The time interval for SNMP availability trigger. |
5m |
| {$STATE.TABLE.UTIL.MAX} | Threshold of state table utilization trigger in %. |
90 |
| {$SOURCE.TRACKING.TABLE.UTIL.MAX} | Threshold of source tracking table utilization trigger in %. |
90 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| SNMP walk network interfaces | Discovering interfaces from IF-MIB. |
SNMP agent | net.if.walk |
| SNMP walk pf network interfaces | MIB: BEGEMOT-PF-MIB SNMP walk through pfInterfacesIfTable. The collected data used in network interfaces LLD for dependent item prototypes. |
SNMP agent | net.if.pf.walk Preprocessing
|
| SNMP walk software | MIB: HOST-RESOURCES-MIB SNMP walk through hrSWRunTable. The collected data used in dependent service status items. |
SNMP agent | opnsense.sw.walk Preprocessing
|
| SNMP walk pf counters | MIB: BEGEMOT-PF-MIB SNMP walk through pfCounter. The collected data used in dependent pf counter items. |
SNMP agent | opnsense.pf_counters.walk |
| SNMP agent availability | Availability of SNMP checks on the host. The value of this item corresponds to availability icons in the host list. Possible values: 0 - not available 1 - available 2 - unknown |
Zabbix internal | zabbix[host,snmp,available] |
| Packet filter running status | MIB: BEGEMOT-PF-MIB True if packet filter is currently enabled. |
SNMP agent | opnsense.pf.status |
| States table current | MIB: BEGEMOT-PF-MIB Number of entries in the state table. |
SNMP agent | opnsense.state.table.count |
| States table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'keep state' rules in the ruleset. |
SNMP agent | opnsense.state.table.limit |
| States table utilization in % | Utilization of state table in %. |
Calculated | opnsense.state.table.pused |
| Source tracking table current | MIB: BEGEMOT-PF-MIB Number of entries in the source tracking table. |
SNMP agent | opnsense.source.tracking.table.count |
| Source tracking table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'sticky-address' or 'source-track' rules in the ruleset. |
SNMP agent | opnsense.source.tracking.table.limit |
| Source tracking table utilization in % | Utilization of source tracking table in %. |
Calculated | opnsense.source.tracking.table.pused |
| DHCP server status | MIB: HOST-RESOURCES-MIB The status of DHCP server process. |
Dependent item | opnsense.dhcpd.status Preprocessing
|
| DNS server status | MIB: HOST-RESOURCES-MIB The status of DNS server process. |
Dependent item | opnsense.dns.status Preprocessing
|
| Web server status | MIB: HOST-RESOURCES-MIB The status of lighttpd process. |
Dependent item | opnsense.lighttpd.status Preprocessing
|
| Packets matched a filter rule | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.match Preprocessing
|
| Packets with bad offset | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.bad.offset Preprocessing
|
| Fragmented packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.fragment Preprocessing
|
| Short packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.short Preprocessing
|
| Normalized packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.normalize Preprocessing
|
| Packets dropped due to memory limitation | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.mem.drop Preprocessing
|
| Firewall rules count | MIB: BEGEMOT-PF-MIB The number of labeled filter rules on this system. |
SNMP agent | opnsense.rules.count |
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: No SNMP data collection | SNMP is not available for polling. Please check device connectivity and SNMP settings. |
max(/OPNsense by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0 |
Warning | |
| OPNsense: Packet filter is not running | Please check PF status. |
last(/OPNsense by SNMP/opnsense.pf.status)<>1 |
High | |
| OPNsense: State table usage is high | Please check the number of connections. |
min(/OPNsense by SNMP/opnsense.state.table.pused,#3)>{$STATE.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: Source tracking table usage is high | Please check the number of sticky connections. |
min(/OPNsense by SNMP/opnsense.source.tracking.table.pused,#3)>{$SOURCE.TRACKING.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: DHCP server is not running | Please check DHCP server settings. |
last(/OPNsense by SNMP/opnsense.dhcpd.status)=0 |
Average | |
| OPNsense: DNS server is not running | Please check DNS server settings. |
last(/OPNsense by SNMP/opnsense.dns.status)=0 |
Average | |
| OPNsense: Web server is not running | Please check lighttpd service status. |
last(/OPNsense by SNMP/opnsense.lighttpd.status)=0 |
Average |
LLD rule Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Network interfaces discovery | Discovering interfaces from IF-MIB. |
Dependent item | opnsense.net.if.discovery Preprocessing
|
Item prototypes for Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound packets discarded | MIB: IF-MIB The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.in.discards[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.in.errors[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Bits received | MIB: IF-MIB The total number of octets received on the interface, including framing characters. This object is a 64-bit version of ifInOctets. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.in[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound packets discarded | MIB: IF-MIB The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.out.discards[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.out.errors[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Bits sent | MIB: IF-MIB The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of ifOutOctets.Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.out[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Speed | MIB: IF-MIB An estimate of the interface's current bandwidth in units of 1,000,000 bits per second. If this object reports a value of |
Dependent item | net.if.speed[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Operational status | MIB: IF-MIB The current operational state of the interface. - The testing(3) state indicates that no operational packet scan be passed - If ifAdminStatus is down(2) then ifOperStatus should be down(2) - If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic - It should change todormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection) - It should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state - It should remain in the notPresent(6) state if the interface has missing(typically, hardware) components. |
Dependent item | net.if.status[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Interface type | MIB: IF-MIB The type of interface. Additional values for ifType are assigned by the Internet Assigned Numbers Authority (IANA), through updating the syntax of the IANAifType textual convention. |
Dependent item | net.if.type[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Rules references count | MIB: BEGEMOT-PF-MIB The number of rules referencing this interface. |
Dependent item | net.if.rules.refs[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed coming in on this interface. |
Dependent item | net.if.in.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked coming in on this interface. |
Dependent item | net.if.in.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed going out on this interface. |
Dependent item | net.if.out.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked going out on this interface. |
Dependent item | net.if.out.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed coming in on this interface. |
Dependent item | net.if.in.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked coming in on this interface. |
Dependent item | net.if.in.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed going out on this interface. |
Dependent item | net.if.out.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked going out on this interface. |
Dependent item | net.if.out.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed coming in on this interface. |
Dependent item | net.if.in.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked coming in on this interface. |
Dependent item | net.if.in.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed going out on this interface. |
Dependent item | net.if.out.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked going out on this interface. |
Dependent item | net.if.out.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed coming in on this interface. |
Dependent item | net.if.in.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked coming in on this interface. |
Dependent item | net.if.in.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed going out on this interface. |
Dependent item | net.if.out.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked going out on this interface. |
Dependent item | net.if.out.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
Trigger prototypes for Network interfaces discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High input error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.in.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High inbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.in[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High output error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.out.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High outbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.out[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Ethernet has changed to lower speed than it was before | This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Acknowledge to close the problem manually. |
change(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])<0 and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 and ( last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=6 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=7 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=11 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=62 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=69 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=117 ) and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])<>2) |
Info | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down | This trigger expression works as follows: |
{$IFCONTROL:"{#IFNAME}"}=1 and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])=2) |
Average |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Vendor and Community integrations are created by third parties and are not verified by Zabbix. Zabbix is not responsible for their functionality or quality.
Zabbix community templates
2 Contributed to the zabbix/community-templates repositoryOB = On Battery = UPS is running on battery power due to mains failure. LB = Low Battery = Battery charge is critically low. UPS will shut down soon. RB = Replace Battery = Battery needs replacement (age or health issue). HB = High Battery = Battery is fully charged (rare, but possible). CHRG = Charging = Battery is currently being charged. DISCHRG = Discharging = Battery is discharging (same as OB, but more specific). OVER = Overload = UPS is overloaded (load exceeds capacity). ALARM = Alarm Active = UPS has triggered an alarm (e.g., overload, battery fault).
Zabbix agent is required on the firewall. Created by Garfieldttt. For documentation, updates, and source code, visit: https://github.com/Garfieldttt/opnsense-zabbix-template Import into Zabbix 7.0 or later.
OPNsense by SNMP
Overview
Template for monitoring OPNsense by SNMP
Requirements
Zabbix version: 7.4 and higher.
Tested versions
This template has been tested on:
- OPNsense 22.1.9, 25.1
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable bsnmpd daemon by creating new config file "/etc/rc.conf.d/bsnmpd" with the following content: bsnmpd_enable="YES"
- Uncomment the following lines in "/etc/snmpd.config" file to enable required SNMP modules: begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so" begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so"
- Start bsnmpd daemon with the following command: /etc/rc.d/bsnmpd start
- Setup a firewall rule to get access from Zabbix proxy or Zabbix server by SNMP (https://docs.opnsense.org/manual/firewall.html).
- Link the template to a host.
Macros used
| Name | Description | Default |
|---|---|---|
| {$IF.ERRORS.WARN} | Threshold of error packets rate for warning trigger. Can be used with interface name as context. |
2 |
| {$IF.UTIL.MAX} | Threshold of interface bandwidth utilization for warning trigger in %. Can be used with interface name as context. |
90 |
| {$IFCONTROL} | Macro for operational state of the interface for link down trigger. Can be used with interface name as context. |
1 |
| {$NET.IF.IFADMINSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.* |
| {$NET.IF.IFADMINSTATUS.NOT_MATCHES} | Ignore down(2) administrative status. |
^2$ |
| {$NET.IF.IFALIAS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFALIAS.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFDESCR.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFDESCR.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFNAME.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
(^pflog[0-9.]*$|^pfsync[0-9.]*$) |
| {$NET.IF.IFOPERSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.*$ |
| {$NET.IF.IFOPERSTATUS.NOT_MATCHES} | Ignore notPresent(6). |
^6$ |
| {$NET.IF.IFTYPE.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFTYPE.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$SNMP.TIMEOUT} | The time interval for SNMP availability trigger. |
5m |
| {$STATE.TABLE.UTIL.MAX} | Threshold of state table utilization trigger in %. |
90 |
| {$SOURCE.TRACKING.TABLE.UTIL.MAX} | Threshold of source tracking table utilization trigger in %. |
90 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| SNMP walk network interfaces | Discovering interfaces from IF-MIB. |
SNMP agent | net.if.walk |
| SNMP walk pf network interfaces | MIB: BEGEMOT-PF-MIB SNMP walk through pfInterfacesIfTable. The collected data used in network interfaces LLD for dependent item prototypes. |
SNMP agent | net.if.pf.walk Preprocessing
|
| SNMP walk software | MIB: HOST-RESOURCES-MIB SNMP walk through hrSWRunTable. The collected data used in dependent service status items. |
SNMP agent | opnsense.sw.walk Preprocessing
|
| SNMP walk pf counters | MIB: BEGEMOT-PF-MIB SNMP walk through pfCounter. The collected data used in dependent pf counter items. |
SNMP agent | opnsense.pf_counters.walk |
| SNMP agent availability | Availability of SNMP checks on the host. The value of this item corresponds to availability icons in the host list. Possible values: 0 - not available 1 - available 2 - unknown |
Zabbix internal | zabbix[host,snmp,available] |
| Packet filter running status | MIB: BEGEMOT-PF-MIB True if packet filter is currently enabled. |
SNMP agent | opnsense.pf.status |
| States table current | MIB: BEGEMOT-PF-MIB Number of entries in the state table. |
SNMP agent | opnsense.state.table.count |
| States table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'keep state' rules in the ruleset. |
SNMP agent | opnsense.state.table.limit |
| States table utilization in % | Utilization of state table in %. |
Calculated | opnsense.state.table.pused |
| Source tracking table current | MIB: BEGEMOT-PF-MIB Number of entries in the source tracking table. |
SNMP agent | opnsense.source.tracking.table.count |
| Source tracking table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'sticky-address' or 'source-track' rules in the ruleset. |
SNMP agent | opnsense.source.tracking.table.limit |
| Source tracking table utilization in % | Utilization of source tracking table in %. |
Calculated | opnsense.source.tracking.table.pused |
| DHCP server status | MIB: HOST-RESOURCES-MIB The status of DHCP server process. |
Dependent item | opnsense.dhcpd.status Preprocessing
|
| DNS server status | MIB: HOST-RESOURCES-MIB The status of DNS server process. |
Dependent item | opnsense.dns.status Preprocessing
|
| Web server status | MIB: HOST-RESOURCES-MIB The status of lighttpd process. |
Dependent item | opnsense.lighttpd.status Preprocessing
|
| Packets matched a filter rule | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.match Preprocessing
|
| Packets with bad offset | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.bad.offset Preprocessing
|
| Fragmented packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.fragment Preprocessing
|
| Short packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.short Preprocessing
|
| Normalized packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.normalize Preprocessing
|
| Packets dropped due to memory limitation | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.mem.drop Preprocessing
|
| Firewall rules count | MIB: BEGEMOT-PF-MIB The number of labeled filter rules on this system. |
SNMP agent | opnsense.rules.count |
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: No SNMP data collection | SNMP is not available for polling. Please check device connectivity and SNMP settings. |
max(/OPNsense by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0 |
Warning | |
| OPNsense: Packet filter is not running | Please check PF status. |
last(/OPNsense by SNMP/opnsense.pf.status)<>1 |
High | |
| OPNsense: State table usage is high | Please check the number of connections. |
min(/OPNsense by SNMP/opnsense.state.table.pused,#3)>{$STATE.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: Source tracking table usage is high | Please check the number of sticky connections. |
min(/OPNsense by SNMP/opnsense.source.tracking.table.pused,#3)>{$SOURCE.TRACKING.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: DHCP server is not running | Please check DHCP server settings. |
last(/OPNsense by SNMP/opnsense.dhcpd.status)=0 |
Average | |
| OPNsense: DNS server is not running | Please check DNS server settings. |
last(/OPNsense by SNMP/opnsense.dns.status)=0 |
Average | |
| OPNsense: Web server is not running | Please check lighttpd service status. |
last(/OPNsense by SNMP/opnsense.lighttpd.status)=0 |
Average |
LLD rule Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Network interfaces discovery | Discovering interfaces from IF-MIB. |
Dependent item | opnsense.net.if.discovery Preprocessing
|
Item prototypes for Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound packets discarded | MIB: IF-MIB The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.in.discards[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.in.errors[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Bits received | MIB: IF-MIB The total number of octets received on the interface, including framing characters. This object is a 64-bit version of ifInOctets. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.in[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound packets discarded | MIB: IF-MIB The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.out.discards[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.out.errors[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Bits sent | MIB: IF-MIB The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of ifOutOctets.Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.out[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Speed | MIB: IF-MIB An estimate of the interface's current bandwidth in units of 1,000,000 bits per second. If this object reports a value of |
Dependent item | net.if.speed[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Operational status | MIB: IF-MIB The current operational state of the interface. - The testing(3) state indicates that no operational packet scan be passed - If ifAdminStatus is down(2) then ifOperStatus should be down(2) - If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic - It should change todormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection) - It should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state - It should remain in the notPresent(6) state if the interface has missing(typically, hardware) components. |
Dependent item | net.if.status[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Interface type | MIB: IF-MIB The type of interface. Additional values for ifType are assigned by the Internet Assigned Numbers Authority (IANA), through updating the syntax of the IANAifType textual convention. |
Dependent item | net.if.type[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Rules references count | MIB: BEGEMOT-PF-MIB The number of rules referencing this interface. |
Dependent item | net.if.rules.refs[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed coming in on this interface. |
Dependent item | net.if.in.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked coming in on this interface. |
Dependent item | net.if.in.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed going out on this interface. |
Dependent item | net.if.out.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked going out on this interface. |
Dependent item | net.if.out.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed coming in on this interface. |
Dependent item | net.if.in.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked coming in on this interface. |
Dependent item | net.if.in.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed going out on this interface. |
Dependent item | net.if.out.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked going out on this interface. |
Dependent item | net.if.out.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed coming in on this interface. |
Dependent item | net.if.in.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked coming in on this interface. |
Dependent item | net.if.in.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed going out on this interface. |
Dependent item | net.if.out.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked going out on this interface. |
Dependent item | net.if.out.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed coming in on this interface. |
Dependent item | net.if.in.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked coming in on this interface. |
Dependent item | net.if.in.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed going out on this interface. |
Dependent item | net.if.out.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked going out on this interface. |
Dependent item | net.if.out.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
Trigger prototypes for Network interfaces discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High input error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.in.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High inbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.in[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High output error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.out.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High outbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.out[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Ethernet has changed to lower speed than it was before | This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Acknowledge to close the problem manually. |
change(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])<0 and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 and ( last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=6 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=7 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=11 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=62 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=69 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=117 ) and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])<>2) |
Info | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down | This trigger expression works as follows: |
{$IFCONTROL:"{#IFNAME}"}=1 and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])=2) |
Average |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
OPNsense by SNMP
Overview
Template for monitoring OPNsense by SNMP
Requirements
Zabbix version: 7.2 and higher.
Tested versions
This template has been tested on:
- OPNsense 22.1.9
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable bsnmpd daemon by creating new config file "/etc/rc.conf.d/bsnmpd" with the following content: bsnmpd_enable="YES"
- Uncomment the following lines in "/etc/snmpd.config" file to enable required SNMP modules: begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so" begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so"
- Start bsnmpd daemon with the following command: /etc/rc.d/bsnmpd start
- Setup a firewall rule to get access from Zabbix proxy or Zabbix server by SNMP (https://docs.opnsense.org/manual/firewall.html).
- Link the template to a host.
Macros used
| Name | Description | Default |
|---|---|---|
| {$IF.ERRORS.WARN} | Threshold of error packets rate for warning trigger. Can be used with interface name as context. |
2 |
| {$IF.UTIL.MAX} | Threshold of interface bandwidth utilization for warning trigger in %. Can be used with interface name as context. |
90 |
| {$IFCONTROL} | Macro for operational state of the interface for link down trigger. Can be used with interface name as context. |
1 |
| {$NET.IF.IFADMINSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.* |
| {$NET.IF.IFADMINSTATUS.NOT_MATCHES} | Ignore down(2) administrative status. |
^2$ |
| {$NET.IF.IFALIAS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFALIAS.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFDESCR.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFDESCR.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFNAME.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
(^pflog[0-9.]*$|^pfsync[0-9.]*$) |
| {$NET.IF.IFOPERSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.*$ |
| {$NET.IF.IFOPERSTATUS.NOT_MATCHES} | Ignore notPresent(6). |
^6$ |
| {$NET.IF.IFTYPE.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFTYPE.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$SNMP.TIMEOUT} | The time interval for SNMP availability trigger. |
5m |
| {$STATE.TABLE.UTIL.MAX} | Threshold of state table utilization trigger in %. |
90 |
| {$SOURCE.TRACKING.TABLE.UTIL.MAX} | Threshold of source tracking table utilization trigger in %. |
90 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| SNMP agent availability | Availability of SNMP checks on the host. The value of this item corresponds to availability icons in the host list. Possible values: 0 - not available 1 - available 2 - unknown |
Zabbix internal | zabbix[host,snmp,available] |
| Packet filter running status | MIB: BEGEMOT-PF-MIB True if packet filter is currently enabled. |
SNMP agent | opnsense.pf.status |
| States table current | MIB: BEGEMOT-PF-MIB Number of entries in the state table. |
SNMP agent | opnsense.state.table.count |
| States table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'keep state' rules in the ruleset. |
SNMP agent | opnsense.state.table.limit |
| States table utilization in % | Utilization of state table in %. |
Calculated | opnsense.state.table.pused |
| Source tracking table current | MIB: BEGEMOT-PF-MIB Number of entries in the source tracking table. |
SNMP agent | opnsense.source.tracking.table.count |
| Source tracking table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'sticky-address' or 'source-track' rules in the ruleset. |
SNMP agent | opnsense.source.tracking.table.limit |
| Source tracking table utilization in % | Utilization of source tracking table in %. |
Calculated | opnsense.source.tracking.table.pused |
| DHCP server status | MIB: HOST-RESOURCES-MIB The status of DHCP server process. |
SNMP agent | opnsense.dhcpd.status Preprocessing
|
| DNS server status | MIB: HOST-RESOURCES-MIB The status of DNS server process. |
SNMP agent | opnsense.dns.status Preprocessing
|
| Web server status | MIB: HOST-RESOURCES-MIB The status of lighttpd process. |
SNMP agent | opnsense.lighttpd.status Preprocessing
|
| Packets matched a filter rule | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.match Preprocessing
|
| Packets with bad offset | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.bad.offset Preprocessing
|
| Fragmented packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.fragment Preprocessing
|
| Short packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.short Preprocessing
|
| Normalized packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.normalize Preprocessing
|
| Packets dropped due to memory limitation | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.mem.drop Preprocessing
|
| Firewall rules count | MIB: BEGEMOT-PF-MIB The number of labeled filter rules on this system. |
SNMP agent | opnsense.rules.count |
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: No SNMP data collection | SNMP is not available for polling. Please check device connectivity and SNMP settings. |
max(/OPNsense by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0 |
Warning | |
| OPNsense: Packet filter is not running | Please check PF status. |
last(/OPNsense by SNMP/opnsense.pf.status)<>1 |
High | |
| OPNsense: State table usage is high | Please check the number of connections. |
min(/OPNsense by SNMP/opnsense.state.table.pused,#3)>{$STATE.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: Source tracking table usage is high | Please check the number of sticky connections. |
min(/OPNsense by SNMP/opnsense.source.tracking.table.pused,#3)>{$SOURCE.TRACKING.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: DHCP server is not running | Please check DHCP server settings. |
last(/OPNsense by SNMP/opnsense.dhcpd.status)=0 |
Average | |
| OPNsense: DNS server is not running | Please check DNS server settings. |
last(/OPNsense by SNMP/opnsense.dns.status)=0 |
Average | |
| OPNsense: Web server is not running | Please check lighttpd service status. |
last(/OPNsense by SNMP/opnsense.lighttpd.status)=0 |
Average |
LLD rule Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Network interfaces discovery | Discovering interfaces from IF-MIB. |
SNMP agent | opnsense.net.if.discovery |
Item prototypes for Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound packets discarded | MIB: IF-MIB The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.in.discards[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.in.errors[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Bits received | MIB: IF-MIB The total number of octets received on the interface, including framing characters. This object is a 64-bit version of ifInOctets. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.in[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound packets discarded | MIB: IF-MIB The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.out.discards[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.out.errors[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Bits sent | MIB: IF-MIB The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of ifOutOctets.Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.out[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Speed | MIB: IF-MIB An estimate of the interface's current bandwidth in units of 1,000,000 bits per second. If this object reports a value of |
SNMP agent | net.if.speed[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Operational status | MIB: IF-MIB The current operational state of the interface. - The testing(3) state indicates that no operational packet scan be passed - If ifAdminStatus is down(2) then ifOperStatus should be down(2) - If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic - It should change todormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection) - It should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state - It should remain in the notPresent(6) state if the interface has missing(typically, hardware) components. |
SNMP agent | net.if.status[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Interface type | MIB: IF-MIB The type of interface. Additional values for ifType are assigned by the Internet Assigned Numbers Authority (IANA), through updating the syntax of the IANAifType textual convention. |
SNMP agent | net.if.type[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Rules references count | MIB: BEGEMOT-PF-MIB The number of rules referencing this interface. |
SNMP agent | net.if.rules.refs[{#SNMPINDEX}] |
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed coming in on this interface. |
SNMP agent | net.if.in.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked coming in on this interface. |
SNMP agent | net.if.in.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed going out on this interface. |
SNMP agent | net.if.out.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked going out on this interface. |
SNMP agent | net.if.out.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed coming in on this interface. |
SNMP agent | net.if.in.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked coming in on this interface. |
SNMP agent | net.if.in.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed going out on this interface. |
SNMP agent | net.if.out.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked going out on this interface. |
SNMP agent | net.if.out.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed coming in on this interface. |
SNMP agent | net.if.in.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked coming in on this interface. |
SNMP agent | net.if.in.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed going out on this interface. |
SNMP agent | net.if.out.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked going out on this interface. |
SNMP agent | net.if.out.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed coming in on this interface. |
SNMP agent | net.if.in.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked coming in on this interface. |
SNMP agent | net.if.in.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed going out on this interface. |
SNMP agent | net.if.out.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked going out on this interface. |
SNMP agent | net.if.out.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
Trigger prototypes for Network interfaces discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High input error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.in.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High inbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.in[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High output error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.out.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High outbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.out[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Ethernet has changed to lower speed than it was before | This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Acknowledge to close the problem manually. |
change(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])<0 and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 and ( last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=6 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=7 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=11 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=62 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=69 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=117 ) and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])<>2) |
Info | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down | This trigger expression works as follows: |
{$IFCONTROL:"{#IFNAME}"}=1 and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])=2) |
Average |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
OPNsense by SNMP
Overview
Template for monitoring OPNsense by SNMP
Requirements
Zabbix version: 7.0 and higher.
Tested versions
This template has been tested on:
- OPNsense 22.1.9, 25.1
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable bsnmpd daemon by creating new config file "/etc/rc.conf.d/bsnmpd" with the following content: bsnmpd_enable="YES"
- Uncomment the following lines in "/etc/snmpd.config" file to enable required SNMP modules: begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so" begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so"
- Start bsnmpd daemon with the following command: /etc/rc.d/bsnmpd start
- Setup a firewall rule to get access from Zabbix proxy or Zabbix server by SNMP (https://docs.opnsense.org/manual/firewall.html).
- Link the template to a host.
Macros used
| Name | Description | Default |
|---|---|---|
| {$IF.ERRORS.WARN} | Threshold of error packets rate for warning trigger. Can be used with interface name as context. |
2 |
| {$IF.UTIL.MAX} | Threshold of interface bandwidth utilization for warning trigger in %. Can be used with interface name as context. |
90 |
| {$IFCONTROL} | Macro for operational state of the interface for link down trigger. Can be used with interface name as context. |
1 |
| {$NET.IF.IFADMINSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.* |
| {$NET.IF.IFADMINSTATUS.NOT_MATCHES} | Ignore down(2) administrative status. |
^2$ |
| {$NET.IF.IFALIAS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFALIAS.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFDESCR.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFDESCR.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFNAME.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
(^pflog[0-9.]*$|^pfsync[0-9.]*$) |
| {$NET.IF.IFOPERSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.*$ |
| {$NET.IF.IFOPERSTATUS.NOT_MATCHES} | Ignore notPresent(6). |
^6$ |
| {$NET.IF.IFTYPE.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFTYPE.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$SNMP.TIMEOUT} | The time interval for SNMP availability trigger. |
5m |
| {$STATE.TABLE.UTIL.MAX} | Threshold of state table utilization trigger in %. |
90 |
| {$SOURCE.TRACKING.TABLE.UTIL.MAX} | Threshold of source tracking table utilization trigger in %. |
90 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| SNMP walk network interfaces | Discovering interfaces from IF-MIB. |
SNMP agent | net.if.walk |
| SNMP walk pf network interfaces | MIB: BEGEMOT-PF-MIB SNMP walk through pfInterfacesIfTable. The collected data used in network interfaces LLD for dependent item prototypes. |
SNMP agent | net.if.pf.walk Preprocessing
|
| SNMP walk software | MIB: HOST-RESOURCES-MIB SNMP walk through hrSWRunTable. The collected data used in dependent service status items. |
SNMP agent | opnsense.sw.walk Preprocessing
|
| SNMP walk pf counters | MIB: BEGEMOT-PF-MIB SNMP walk through pfCounter. The collected data used in dependent pf counter items. |
SNMP agent | opnsense.pf_counters.walk |
| SNMP agent availability | Availability of SNMP checks on the host. The value of this item corresponds to availability icons in the host list. Possible values: 0 - not available 1 - available 2 - unknown |
Zabbix internal | zabbix[host,snmp,available] |
| Packet filter running status | MIB: BEGEMOT-PF-MIB True if packet filter is currently enabled. |
SNMP agent | opnsense.pf.status |
| States table current | MIB: BEGEMOT-PF-MIB Number of entries in the state table. |
SNMP agent | opnsense.state.table.count |
| States table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'keep state' rules in the ruleset. |
SNMP agent | opnsense.state.table.limit |
| States table utilization in % | Utilization of state table in %. |
Calculated | opnsense.state.table.pused |
| Source tracking table current | MIB: BEGEMOT-PF-MIB Number of entries in the source tracking table. |
SNMP agent | opnsense.source.tracking.table.count |
| Source tracking table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'sticky-address' or 'source-track' rules in the ruleset. |
SNMP agent | opnsense.source.tracking.table.limit |
| Source tracking table utilization in % | Utilization of source tracking table in %. |
Calculated | opnsense.source.tracking.table.pused |
| DHCP server status | MIB: HOST-RESOURCES-MIB The status of DHCP server process. |
Dependent item | opnsense.dhcpd.status Preprocessing
|
| DNS server status | MIB: HOST-RESOURCES-MIB The status of DNS server process. |
Dependent item | opnsense.dns.status Preprocessing
|
| Web server status | MIB: HOST-RESOURCES-MIB The status of lighttpd process. |
Dependent item | opnsense.lighttpd.status Preprocessing
|
| Packets matched a filter rule | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.match Preprocessing
|
| Packets with bad offset | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.bad.offset Preprocessing
|
| Fragmented packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.fragment Preprocessing
|
| Short packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.short Preprocessing
|
| Normalized packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.normalize Preprocessing
|
| Packets dropped due to memory limitation | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
Dependent item | opnsense.packets.mem.drop Preprocessing
|
| Firewall rules count | MIB: BEGEMOT-PF-MIB The number of labeled filter rules on this system. |
SNMP agent | opnsense.rules.count |
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: No SNMP data collection | SNMP is not available for polling. Please check device connectivity and SNMP settings. |
max(/OPNsense by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0 |
Warning | |
| OPNsense: Packet filter is not running | Please check PF status. |
last(/OPNsense by SNMP/opnsense.pf.status)<>1 |
High | |
| OPNsense: State table usage is high | Please check the number of connections. |
min(/OPNsense by SNMP/opnsense.state.table.pused,#3)>{$STATE.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: Source tracking table usage is high | Please check the number of sticky connections. |
min(/OPNsense by SNMP/opnsense.source.tracking.table.pused,#3)>{$SOURCE.TRACKING.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: DHCP server is not running | Please check DHCP server settings. |
last(/OPNsense by SNMP/opnsense.dhcpd.status)=0 |
Average | |
| OPNsense: DNS server is not running | Please check DNS server settings. |
last(/OPNsense by SNMP/opnsense.dns.status)=0 |
Average | |
| OPNsense: Web server is not running | Please check lighttpd service status. |
last(/OPNsense by SNMP/opnsense.lighttpd.status)=0 |
Average |
LLD rule Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Network interfaces discovery | Discovering interfaces from IF-MIB. |
Dependent item | opnsense.net.if.discovery Preprocessing
|
Item prototypes for Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound packets discarded | MIB: IF-MIB The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.in.discards[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.in.errors[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Bits received | MIB: IF-MIB The total number of octets received on the interface, including framing characters. This object is a 64-bit version of ifInOctets. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.in[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound packets discarded | MIB: IF-MIB The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.out.discards[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.out.errors[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Bits sent | MIB: IF-MIB The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of ifOutOctets.Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
Dependent item | net.if.out[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Speed | MIB: IF-MIB An estimate of the interface's current bandwidth in units of 1,000,000 bits per second. If this object reports a value of |
Dependent item | net.if.speed[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Operational status | MIB: IF-MIB The current operational state of the interface. - The testing(3) state indicates that no operational packet scan be passed - If ifAdminStatus is down(2) then ifOperStatus should be down(2) - If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic - It should change todormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection) - It should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state - It should remain in the notPresent(6) state if the interface has missing(typically, hardware) components. |
Dependent item | net.if.status[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Interface type | MIB: IF-MIB The type of interface. Additional values for ifType are assigned by the Internet Assigned Numbers Authority (IANA), through updating the syntax of the IANAifType textual convention. |
Dependent item | net.if.type[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Rules references count | MIB: BEGEMOT-PF-MIB The number of rules referencing this interface. |
Dependent item | net.if.rules.refs[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed coming in on this interface. |
Dependent item | net.if.in.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked coming in on this interface. |
Dependent item | net.if.in.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed going out on this interface. |
Dependent item | net.if.out.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked going out on this interface. |
Dependent item | net.if.out.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed coming in on this interface. |
Dependent item | net.if.in.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked coming in on this interface. |
Dependent item | net.if.in.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed going out on this interface. |
Dependent item | net.if.out.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked going out on this interface. |
Dependent item | net.if.out.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed coming in on this interface. |
Dependent item | net.if.in.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked coming in on this interface. |
Dependent item | net.if.in.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed going out on this interface. |
Dependent item | net.if.out.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked going out on this interface. |
Dependent item | net.if.out.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed coming in on this interface. |
Dependent item | net.if.in.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked coming in on this interface. |
Dependent item | net.if.in.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed going out on this interface. |
Dependent item | net.if.out.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked going out on this interface. |
Dependent item | net.if.out.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
Trigger prototypes for Network interfaces discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High input error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.in.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High inbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.in[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High output error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.out.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High outbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.out[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Ethernet has changed to lower speed than it was before | This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Acknowledge to close the problem manually. |
change(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])<0 and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 and ( last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=6 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=7 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=11 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=62 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=69 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=117 ) and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])<>2) |
Info | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down | This trigger expression works as follows: |
{$IFCONTROL:"{#IFNAME}"}=1 and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])=2) |
Average |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
OPNsense by SNMP
Overview
Template for monitoring OPNsense by SNMP
Requirements
Zabbix version: 6.4 and higher.
Tested versions
This template has been tested on:
- OPNsense 22.1.9
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable bsnmpd daemon by creating new config file "/etc/rc.conf.d/bsnmpd" with the following content:
bsnmpd_enable="YES" - Uncomment the following lines in "/etc/snmpd.config" file to enable required SNMP modules:
begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so"
begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so" - Start bsnmpd daemon with the following command:
/etc/rc.d/bsnmpd start - Setup a firewall rule to get access from Zabbix proxy or Zabbix server by SNMP (https://docs.opnsense.org/manual/firewall.html).
- Link the template to a host.
Macros used
| Name | Description | Default |
|---|---|---|
| {$IF.ERRORS.WARN} | Threshold of error packets rate for warning trigger. Can be used with interface name as context. |
2 |
| {$IF.UTIL.MAX} | Threshold of interface bandwidth utilization for warning trigger in %. Can be used with interface name as context. |
90 |
| {$IFCONTROL} | Macro for operational state of the interface for link down trigger. Can be used with interface name as context. |
1 |
| {$NET.IF.IFADMINSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.* |
| {$NET.IF.IFADMINSTATUS.NOT_MATCHES} | Ignore down(2) administrative status. |
^2$ |
| {$NET.IF.IFALIAS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFALIAS.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFDESCR.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFDESCR.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFNAME.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
(^pflog[0-9.]*$|^pfsync[0-9.]*$) |
| {$NET.IF.IFOPERSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.*$ |
| {$NET.IF.IFOPERSTATUS.NOT_MATCHES} | Ignore notPresent(6). |
^6$ |
| {$NET.IF.IFTYPE.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFTYPE.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$SNMP.TIMEOUT} | The time interval for SNMP availability trigger. |
5m |
| {$STATE.TABLE.UTIL.MAX} | Threshold of state table utilization trigger in %. |
90 |
| {$SOURCE.TRACKING.TABLE.UTIL.MAX} | Threshold of source tracking table utilization trigger in %. |
90 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| OPNsense: SNMP agent availability | Availability of SNMP checks on the host. The value of this item corresponds to availability icons in the host list. Possible value: 0 - not available 1 - available 2 - unknown |
Zabbix internal | zabbix[host,snmp,available] |
| OPNsense: Packet filter running status | MIB: BEGEMOT-PF-MIB True if packet filter is currently enabled. |
SNMP agent | opnsense.pf.status |
| OPNsense: States table current | MIB: BEGEMOT-PF-MIB Number of entries in the state table. |
SNMP agent | opnsense.state.table.count |
| OPNsense: States table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'keep state' rules in the ruleset. |
SNMP agent | opnsense.state.table.limit |
| OPNsense: States table utilization in % | Utilization of state table in %. |
Calculated | opnsense.state.table.pused |
| OPNsense: Source tracking table current | MIB: BEGEMOT-PF-MIB Number of entries in the source tracking table. |
SNMP agent | opnsense.source.tracking.table.count |
| OPNsense: Source tracking table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'sticky-address' or 'source-track' rules in the ruleset. |
SNMP agent | opnsense.source.tracking.table.limit |
| OPNsense: Source tracking table utilization in % | Utilization of source tracking table in %. |
Calculated | opnsense.source.tracking.table.pused |
| OPNsense: DHCP server status | MIB: HOST-RESOURCES-MIB The status of DHCP server process. |
SNMP agent | opnsense.dhcpd.status Preprocessing
|
| OPNsense: DNS server status | MIB: HOST-RESOURCES-MIB The status of DNS server process. |
SNMP agent | opnsense.dns.status Preprocessing
|
| OPNsense: Web server status | MIB: HOST-RESOURCES-MIB The status of lighttpd process. |
SNMP agent | opnsense.lighttpd.status Preprocessing
|
| OPNsense: Packets matched a filter rule | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.match Preprocessing
|
| OPNsense: Packets with bad offset | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.bad.offset Preprocessing
|
| OPNsense: Fragmented packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.fragment Preprocessing
|
| OPNsense: Short packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.short Preprocessing
|
| OPNsense: Normalized packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.normalize Preprocessing
|
| OPNsense: Packets dropped due to memory limitation | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.mem.drop Preprocessing
|
| OPNsense: Firewall rules count | MIB: BEGEMOT-PF-MIB The number of labeled filter rules on this system. |
SNMP agent | opnsense.rules.count |
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: No SNMP data collection | SNMP is not available for polling. Please check device connectivity and SNMP settings. |
max(/OPNsense by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0 |
Warning | |
| OPNsense: Packet filter is not running | Please check PF status. |
last(/OPNsense by SNMP/opnsense.pf.status)<>1 |
High | |
| OPNsense: State table usage is high | Please check the number of connections. |
min(/OPNsense by SNMP/opnsense.state.table.pused,#3)>{$STATE.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: Source tracking table usage is high | Please check the number of sticky connections. |
min(/OPNsense by SNMP/opnsense.source.tracking.table.pused,#3)>{$SOURCE.TRACKING.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: DHCP server is not running | Please check DHCP server settings. |
last(/OPNsense by SNMP/opnsense.dhcpd.status)=0 |
Average | |
| OPNsense: DNS server is not running | Please check DNS server settings. |
last(/OPNsense by SNMP/opnsense.dns.status)=0 |
Average | |
| OPNsense: Web server is not running | Please check lighttpd service status. |
last(/OPNsense by SNMP/opnsense.lighttpd.status)=0 |
Average |
LLD rule Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Network interfaces discovery | Discovering interfaces from IF-MIB. |
SNMP agent | opnsense.net.if.discovery |
Item prototypes for Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound packets discarded | MIB: IF-MIB The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.in.discards[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.in.errors[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Bits received | MIB: IF-MIB The total number of octets received on the interface, including framing characters. This object is a 64-bit version of ifInOctets. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.in[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound packets discarded | MIB: IF-MIB The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.out.discards[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.out.errors[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Bits sent | MIB: IF-MIB The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of ifOutOctets.Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.out[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Speed | MIB: IF-MIB An estimate of the interface's current bandwidth in units of 1,000,000 bits per second. If this object reports a value of |
SNMP agent | net.if.speed[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Operational status | MIB: IF-MIB The current operational state of the interface. - The testing(3) state indicates that no operational packet scan be passed - If ifAdminStatus is down(2) then ifOperStatus should be down(2) - If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic - It should change todormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection) - It should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state - It should remain in the notPresent(6) state if the interface has missing(typically, hardware) components. |
SNMP agent | net.if.status[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Interface type | MIB: IF-MIB The type of interface. Additional values for ifType are assigned by the Internet Assigned Numbers Authority (IANA), through updating the syntax of the IANAifType textual convention. |
SNMP agent | net.if.type[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Rules references count | MIB: BEGEMOT-PF-MIB The number of rules referencing this interface. |
SNMP agent | net.if.rules.refs[{#SNMPINDEX}] |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed coming in on this interface. |
SNMP agent | net.if.in.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked coming in on this interface. |
SNMP agent | net.if.in.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed going out on this interface. |
SNMP agent | net.if.out.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked going out on this interface. |
SNMP agent | net.if.out.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed coming in on this interface. |
SNMP agent | net.if.in.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked coming in on this interface. |
SNMP agent | net.if.in.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed going out on this interface. |
SNMP agent | net.if.out.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked going out on this interface. |
SNMP agent | net.if.out.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed coming in on this interface. |
SNMP agent | net.if.in.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked coming in on this interface. |
SNMP agent | net.if.in.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed going out on this interface. |
SNMP agent | net.if.out.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked going out on this interface. |
SNMP agent | net.if.out.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed coming in on this interface. |
SNMP agent | net.if.in.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked coming in on this interface. |
SNMP agent | net.if.in.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed going out on this interface. |
SNMP agent | net.if.out.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked going out on this interface. |
SNMP agent | net.if.out.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
Trigger prototypes for Network interfaces discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High input error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.in.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High inbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.in[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High output error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.out.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High outbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.out[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Ethernet has changed to lower speed than it was before | This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Acknowledge to close the problem manually. |
change(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])<0 and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 and ( last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=6 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=7 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=11 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=62 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=69 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=117 ) and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])<>2) |
Info | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down | This trigger expression works as follows: |
{$IFCONTROL:"{#IFNAME}"}=1 and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])=2) |
Average |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
OPNsense by SNMP
Overview
For Zabbix version: 6.2 and higher. Template for monitoring OPNsense by SNMP
This template was tested on:
- OPNsense, version 22.1.9
Setup
See Zabbix template operation for basic instructions.
- Enable bsnmpd daemon by creating new config file "/etc/rc.conf.d/bsnmpd" with the following content:
bsnmpd_enable="YES" - Uncomment the following lines in "/etc/snmpd.config" file to enable required SNMP modules:
begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so"
begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so" - Start bsnmpd daemon with the following command:
/etc/rc.d/bsnmpd start - Setup a firewall rule to get access from Zabbix proxy or Zabbix server by SNMP (https://docs.opnsense.org/manual/firewall.html).
- Link the template to a host.
Zabbix configuration
No specific Zabbix configuration is required.
Macros used
| Name | Description | Default |
|---|---|---|
| {$IF.ERRORS.WARN} | Threshold of error packets rate for warning trigger. Can be used with interface name as context. |
2 |
| {$IF.UTIL.MAX} | Threshold of interface bandwidth utilization for warning trigger in %. Can be used with interface name as context. |
90 |
| {$IFCONTROL} | Macro for operational state of the interface for link down trigger. Can be used with interface name as context. |
1 |
| {$NET.IF.IFADMINSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.* |
| {$NET.IF.IFADMINSTATUS.NOT_MATCHES} | Ignore down(2) administrative status. |
^2$ |
| {$NET.IF.IFALIAS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFALIAS.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFDESCR.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFDESCR.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFNAME.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
`(^pflog[0-9.]*$ |
| {$NET.IF.IFOPERSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.*$ |
| {$NET.IF.IFOPERSTATUS.NOT_MATCHES} | Ignore notPresent(6). |
^6$ |
| {$NET.IF.IFTYPE.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFTYPE.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$SNMP.TIMEOUT} | The time interval for SNMP availability trigger. |
5m |
| {$SOURCE.TRACKING.TABLE.UTIL.MAX} | Threshold of source tracking table utilization trigger in %. |
90 |
| {$STATE.TABLE.UTIL.MAX} | Threshold of state table utilization trigger in %. |
90 |
Template links
There are no template links in this template.
Discovery rules
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Network interfaces discovery | Discovering interfaces from IF-MIB. |
SNMP | opnsense.net.if.discovery Filter: AND- {#IFADMINSTATUS} MATCHES_REGEX - {#IFADMINSTATUS} NOT_MATCHES_REGEX - {#IFOPERSTATUS} MATCHES_REGEX - {#IFOPERSTATUS} NOT_MATCHES_REGEX - {#IFNAME} MATCHES_REGEX - {#IFNAME} NOT_MATCHES_REGEX - {#IFDESCR} MATCHES_REGEX - {#IFDESCR} NOT_MATCHES_REGEX - {#IFALIAS} MATCHES_REGEX - {#IFALIAS} NOT_MATCHES_REGEX - {#IFTYPE} MATCHES_REGEX - {#IFTYPE} NOT_MATCHES_REGEX |
Items collected
| Group | Name | Description | Type | Key and additional info |
|---|---|---|---|---|
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound packets discarded | MIB: IF-MIB The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.in.discards[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND: `` |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.in.errors[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND: `` |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Bits received | MIB: IF-MIB The total number of octets received on the interface, including framing characters. This object is a 64-bit version of ifInOctets. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.in[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND: `` - MULTIPLIER: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound packets discarded | MIB: IF-MIB The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.out.discards[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND: `` |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.out.errors[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND: `` |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Bits sent | MIB: IF-MIB The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of ifOutOctets.Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.out[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND: `` - MULTIPLIER: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Speed | MIB: IF-MIB An estimate of the interface's current bandwidth in units of 1,000,000 bits per second. If this object reports a value of |
SNMP | net.if.speed[{#SNMPINDEX}] Preprocessing: - MULTIPLIER: - DISCARD_UNCHANGED_HEARTBEAT: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Operational status | MIB: IF-MIB The current operational state of the interface. - The testing(3) state indicates that no operational packet scan be passed - If ifAdminStatus is down(2) then ifOperStatus should be down(2) - If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic - It should change todormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection) - It should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state - It should remain in the notPresent(6) state if the interface has missing(typically, hardware) components. |
SNMP | net.if.status[{#SNMPINDEX}] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Interface type | MIB: IF-MIB The type of interface. Additional values for ifType are assigned by the Internet Assigned Numbers Authority (IANA), through updating the syntax of the IANAifType textual convention. |
SNMP | net.if.type[{#SNMPINDEX}] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Rules references count | MIB: BEGEMOT-PF-MIB The number of rules referencing this interface. |
SNMP | net.if.rules.refs[{#SNMPINDEX}] |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed coming in on this interface. |
SNMP | net.if.in.pass.v4.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked coming in on this interface. |
SNMP | net.if.in.block.v4.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed going out on this interface. |
SNMP | net.if.out.pass.v4.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked going out on this interface. |
SNMP | net.if.out.block.v4.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed coming in on this interface. |
SNMP | net.if.in.pass.v4.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked coming in on this interface. |
SNMP | net.if.in.block.v4.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed going out on this interface. |
SNMP | net.if.out.pass.v4.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked going out on this interface. |
SNMP | net.if.out.block.v4.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed coming in on this interface. |
SNMP | net.if.in.pass.v6.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked coming in on this interface. |
SNMP | net.if.in.block.v6.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed going out on this interface. |
SNMP | net.if.out.pass.v6.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked going out on this interface. |
SNMP | net.if.out.block.v6.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed coming in on this interface. |
SNMP | net.if.in.pass.v6.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked coming in on this interface. |
SNMP | net.if.in.block.v6.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed going out on this interface. |
SNMP | net.if.out.pass.v6.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked going out on this interface. |
SNMP | net.if.out.block.v6.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Packet filter running status | MIB: BEGEMOT-PF-MIB True if packet filter is currently enabled. |
SNMP | opnsense.pf.status |
| OPNsense | OPNsense: States table current | MIB: BEGEMOT-PF-MIB Number of entries in the state table. |
SNMP | opnsense.state.table.count |
| OPNsense | OPNsense: States table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'keep state' rules in the ruleset. |
SNMP | opnsense.state.table.limit |
| OPNsense | OPNsense: States table utilization in % | Utilization of state table in %. |
CALCULATED | opnsense.state.table.pused Expression: last(//opnsense.state.table.count) * 100 / last(//opnsense.state.table.limit) |
| OPNsense | OPNsense: Source tracking table current | MIB: BEGEMOT-PF-MIB Number of entries in the source tracking table. |
SNMP | opnsense.source.tracking.table.count |
| OPNsense | OPNsense: Source tracking table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'sticky-address' or 'source-track' rules in the ruleset. |
SNMP | opnsense.source.tracking.table.limit |
| OPNsense | OPNsense: Source tracking table utilization in % | Utilization of source tracking table in %. |
CALCULATED | opnsense.source.tracking.table.pused Expression: last(//opnsense.source.tracking.table.count) * 100 / last(//opnsense.source.tracking.table.limit) |
| OPNsense | OPNsense: DHCP server status | MIB: HOST-RESOURCES-MIB The status of DHCP server process. |
SNMP | opnsense.dhcpd.status Preprocessing: - CHECK_NOT_SUPPORTED: `` ⛔️ON_FAIL: |
| OPNsense | OPNsense: DNS server status | MIB: HOST-RESOURCES-MIB The status of DNS server process. |
SNMP | opnsense.dns.status Preprocessing: - CHECK_NOT_SUPPORTED: `` ⛔️ON_FAIL: |
| OPNsense | OPNsense: Web server status | MIB: HOST-RESOURCES-MIB The status of lighttpd process. |
SNMP | opnsense.lighttpd.status Preprocessing: - CHECK_NOT_SUPPORTED: `` ⛔️ON_FAIL: |
| OPNsense | OPNsense: Packets matched a filter rule | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.match Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Packets with bad offset | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.bad.offset Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Fragmented packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.fragment Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Short packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.short Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Normalized packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.normalize Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Packets dropped due to memory limitation | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.mem.drop Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Firewall rules count | MIB: BEGEMOT-PF-MIB The number of labeled filter rules on this system. |
SNMP | opnsense.rules.count |
| Status | OPNsense: SNMP agent availability | Availability of SNMP checks on the host. The value of this item corresponds to availability icons in the host list. Possible value: 0 - not available 1 - available 2 - unknown |
INTERNAL | zabbix[host,snmp,available] |
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High input error rate | Recovers when below 80% of {$IF.ERRORS.WARN:"{#IFNAME}"} threshold. |
min(/OPNsense by SNMP/net.if.in.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"}Recovery expression: max(/OPNsense by SNMP/net.if.in.errors[{#SNMPINDEX}],5m)<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8 |
WARNING | Depends on: - OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High inbound bandwidth usage | The network interface utilization is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.in[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 Recovery expression: avg(/OPNsense by SNMP/net.if.in[{#SNMPINDEX}],15m)<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}]) |
WARNING | Depends on: - OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High output error rate | Recovers when below 80% of {$IF.ERRORS.WARN:"{#IFNAME}"} threshold. |
min(/OPNsense by SNMP/net.if.out.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"}Recovery expression: max(/OPNsense by SNMP/net.if.out.errors[{#SNMPINDEX}],5m)<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8 |
WARNING | Depends on: - OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High outbound bandwidth usage | The network interface utilization is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.out[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 Recovery expression: avg(/OPNsense by SNMP/net.if.out[{#SNMPINDEX}],15m)<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}]) |
WARNING | Depends on: - OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Ethernet has changed to lower speed than it was before | This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Ack to close. |
change(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])<0 and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 and ( last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=6 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=7 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=11 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=62 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=69 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=117 ) and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])<>2) Recovery expression: (change(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}],#2)>0) or (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])=2) |
INFO | Depends on: - OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down | This trigger expression works as follows: 1. Can be triggered if operations status is down. 2. {$IFCONTROL:"{#IFNAME}"}=1 - user can redefine Context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down. |
{$IFCONTROL:"{#IFNAME}"}=1 and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])=2) |
AVERAGE | |
| OPNsense: Packet filter is not running | Please check PF status. |
last(/OPNsense by SNMP/opnsense.pf.status)<>1 |
HIGH | |
| OPNsense: State table usage is high | Please check the number of connections. |
min(/OPNsense by SNMP/opnsense.state.table.pused,#3)>{$STATE.TABLE.UTIL.MAX} |
WARNING | |
| OPNsense: Source tracking table usage is high | Please check the number of sticky connections. |
min(/OPNsense by SNMP/opnsense.source.tracking.table.pused,#3)>{$SOURCE.TRACKING.TABLE.UTIL.MAX} |
WARNING | |
| OPNsense: DHCP server is not running | Please check DHCP server settings. |
last(/OPNsense by SNMP/opnsense.dhcpd.status)=0 |
AVERAGE | |
| OPNsense: DNS server is not running | Please check DNS server settings. |
last(/OPNsense by SNMP/opnsense.dns.status)=0 |
AVERAGE | |
| OPNsense: Web server is not running | Please check lighttpd service status. |
last(/OPNsense by SNMP/opnsense.lighttpd.status)=0 |
AVERAGE | |
| OPNsense: No SNMP data collection | SNMP is not available for polling. Please check device connectivity and SNMP settings. |
max(/OPNsense by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0 |
WARNING |
Feedback
Please report any issues with the template at https://support.zabbix.com.
OPNsense by SNMP
Overview
Template for monitoring OPNsense by SNMP
Requirements
Zabbix version: 6.0 and higher.
Tested versions
This template has been tested on:
- OPNsense 22.1.9
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Enable bsnmpd daemon by creating new config file "/etc/rc.conf.d/bsnmpd" with the following content:
bsnmpd_enable="YES" - Uncomment the following lines in "/etc/snmpd.config" file to enable required SNMP modules:
begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so"
begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so" - Start bsnmpd daemon with the following command:
/etc/rc.d/bsnmpd start - Setup a firewall rule to get access from Zabbix proxy or Zabbix server by SNMP (https://docs.opnsense.org/manual/firewall.html).
- Link the template to a host.
Macros used
| Name | Description | Default |
|---|---|---|
| {$IF.ERRORS.WARN} | Threshold of error packets rate for warning trigger. Can be used with interface name as context. |
2 |
| {$IF.UTIL.MAX} | Threshold of interface bandwidth utilization for warning trigger in %. Can be used with interface name as context. |
90 |
| {$IFCONTROL} | Macro for operational state of the interface for link down trigger. Can be used with interface name as context. |
1 |
| {$NET.IF.IFADMINSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.* |
| {$NET.IF.IFADMINSTATUS.NOT_MATCHES} | Ignore down(2) administrative status. |
^2$ |
| {$NET.IF.IFALIAS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFALIAS.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFDESCR.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFDESCR.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFNAME.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
(^pflog[0-9.]*$|^pfsync[0-9.]*$) |
| {$NET.IF.IFOPERSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.*$ |
| {$NET.IF.IFOPERSTATUS.NOT_MATCHES} | Ignore notPresent(6). |
^6$ |
| {$NET.IF.IFTYPE.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFTYPE.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$SNMP.TIMEOUT} | The time interval for SNMP availability trigger. |
5m |
| {$STATE.TABLE.UTIL.MAX} | Threshold of state table utilization trigger in %. |
90 |
| {$SOURCE.TRACKING.TABLE.UTIL.MAX} | Threshold of source tracking table utilization trigger in %. |
90 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| OPNsense: SNMP agent availability | Availability of SNMP checks on the host. The value of this item corresponds to availability icons in the host list. Possible value: 0 - not available 1 - available 2 - unknown |
Zabbix internal | zabbix[host,snmp,available] |
| OPNsense: Packet filter running status | MIB: BEGEMOT-PF-MIB True if packet filter is currently enabled. |
SNMP agent | opnsense.pf.status |
| OPNsense: States table current | MIB: BEGEMOT-PF-MIB Number of entries in the state table. |
SNMP agent | opnsense.state.table.count |
| OPNsense: States table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'keep state' rules in the ruleset. |
SNMP agent | opnsense.state.table.limit |
| OPNsense: States table utilization in % | Utilization of state table in %. |
Calculated | opnsense.state.table.pused |
| OPNsense: Source tracking table current | MIB: BEGEMOT-PF-MIB Number of entries in the source tracking table. |
SNMP agent | opnsense.source.tracking.table.count |
| OPNsense: Source tracking table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'sticky-address' or 'source-track' rules in the ruleset. |
SNMP agent | opnsense.source.tracking.table.limit |
| OPNsense: Source tracking table utilization in % | Utilization of source tracking table in %. |
Calculated | opnsense.source.tracking.table.pused |
| OPNsense: DHCP server status | MIB: HOST-RESOURCES-MIB The status of DHCP server process. |
SNMP agent | opnsense.dhcpd.status Preprocessing
|
| OPNsense: DNS server status | MIB: HOST-RESOURCES-MIB The status of DNS server process. |
SNMP agent | opnsense.dns.status Preprocessing
|
| OPNsense: Web server status | MIB: HOST-RESOURCES-MIB The status of lighttpd process. |
SNMP agent | opnsense.lighttpd.status Preprocessing
|
| OPNsense: Packets matched a filter rule | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.match Preprocessing
|
| OPNsense: Packets with bad offset | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.bad.offset Preprocessing
|
| OPNsense: Fragmented packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.fragment Preprocessing
|
| OPNsense: Short packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.short Preprocessing
|
| OPNsense: Normalized packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.normalize Preprocessing
|
| OPNsense: Packets dropped due to memory limitation | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP agent | opnsense.packets.mem.drop Preprocessing
|
| OPNsense: Firewall rules count | MIB: BEGEMOT-PF-MIB The number of labeled filter rules on this system. |
SNMP agent | opnsense.rules.count |
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: No SNMP data collection | SNMP is not available for polling. Please check device connectivity and SNMP settings. |
max(/OPNsense by SNMP/zabbix[host,snmp,available],{$SNMP.TIMEOUT})=0 |
Warning | |
| OPNsense: Packet filter is not running | Please check PF status. |
last(/OPNsense by SNMP/opnsense.pf.status)<>1 |
High | |
| OPNsense: State table usage is high | Please check the number of connections. |
min(/OPNsense by SNMP/opnsense.state.table.pused,#3)>{$STATE.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: Source tracking table usage is high | Please check the number of sticky connections. |
min(/OPNsense by SNMP/opnsense.source.tracking.table.pused,#3)>{$SOURCE.TRACKING.TABLE.UTIL.MAX} |
Warning | |
| OPNsense: DHCP server is not running | Please check DHCP server settings. |
last(/OPNsense by SNMP/opnsense.dhcpd.status)=0 |
Average | |
| OPNsense: DNS server is not running | Please check DNS server settings. |
last(/OPNsense by SNMP/opnsense.dns.status)=0 |
Average | |
| OPNsense: Web server is not running | Please check lighttpd service status. |
last(/OPNsense by SNMP/opnsense.lighttpd.status)=0 |
Average |
LLD rule Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Network interfaces discovery | Discovering interfaces from IF-MIB. |
SNMP agent | opnsense.net.if.discovery |
Item prototypes for Network interfaces discovery
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound packets discarded | MIB: IF-MIB The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.in.discards[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.in.errors[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Bits received | MIB: IF-MIB The total number of octets received on the interface, including framing characters. This object is a 64-bit version of ifInOctets. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.in[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound packets discarded | MIB: IF-MIB The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.out.discards[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.out.errors[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Bits sent | MIB: IF-MIB The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of ifOutOctets.Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP agent | net.if.out[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Speed | MIB: IF-MIB An estimate of the interface's current bandwidth in units of 1,000,000 bits per second. If this object reports a value of |
SNMP agent | net.if.speed[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Operational status | MIB: IF-MIB The current operational state of the interface. - The testing(3) state indicates that no operational packet scan be passed - If ifAdminStatus is down(2) then ifOperStatus should be down(2) - If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic - It should change todormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection) - It should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state - It should remain in the notPresent(6) state if the interface has missing(typically, hardware) components. |
SNMP agent | net.if.status[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Interface type | MIB: IF-MIB The type of interface. Additional values for ifType are assigned by the Internet Assigned Numbers Authority (IANA), through updating the syntax of the IANAifType textual convention. |
SNMP agent | net.if.type[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Rules references count | MIB: BEGEMOT-PF-MIB The number of rules referencing this interface. |
SNMP agent | net.if.rules.refs[{#SNMPINDEX}] |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed coming in on this interface. |
SNMP agent | net.if.in.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked coming in on this interface. |
SNMP agent | net.if.in.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed going out on this interface. |
SNMP agent | net.if.out.pass.v4.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked going out on this interface. |
SNMP agent | net.if.out.block.v4.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed coming in on this interface. |
SNMP agent | net.if.in.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked coming in on this interface. |
SNMP agent | net.if.in.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed going out on this interface. |
SNMP agent | net.if.out.pass.v4.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked going out on this interface. |
SNMP agent | net.if.out.block.v4.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed coming in on this interface. |
SNMP agent | net.if.in.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked coming in on this interface. |
SNMP agent | net.if.in.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed going out on this interface. |
SNMP agent | net.if.out.pass.v6.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked going out on this interface. |
SNMP agent | net.if.out.block.v6.bps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed coming in on this interface. |
SNMP agent | net.if.in.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked coming in on this interface. |
SNMP agent | net.if.in.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed going out on this interface. |
SNMP agent | net.if.out.pass.v6.pps[{#SNMPINDEX}] Preprocessing
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked going out on this interface. |
SNMP agent | net.if.out.block.v6.pps[{#SNMPINDEX}] Preprocessing
|
Trigger prototypes for Network interfaces discovery
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High input error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.in.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High inbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.in[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High output error rate | It recovers when it is below 80% of the |
min(/OPNsense by SNMP/net.if.out.errors[{#SNMPINDEX}],5m)>{$IF.ERRORS.WARN:"{#IFNAME}"} |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High outbound bandwidth usage | The utilization of the network interface is close to its estimated maximum bandwidth. |
(avg(/OPNsense by SNMP/net.if.out[{#SNMPINDEX}],15m)>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])) and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 |
Warning | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Ethernet has changed to lower speed than it was before | This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Acknowledge to close the problem manually. |
change(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])<0 and last(/OPNsense by SNMP/net.if.speed[{#SNMPINDEX}])>0 and ( last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=6 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=7 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=11 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=62 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=69 or last(/OPNsense by SNMP/net.if.type[{#SNMPINDEX}])=117 ) and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])<>2) |
Info | Depends on:
|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down | This trigger expression works as follows: |
{$IFCONTROL:"{#IFNAME}"}=1 and (last(/OPNsense by SNMP/net.if.status[{#SNMPINDEX}])=2) |
Average |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums
Template App OPNsense SNMP
Overview
For Zabbix version: 5.0 and higher.
Template for monitoring OPNsense by SNMP
This template has been tested on:
- OPNsense, version 22.1.9
Setup
See Zabbix template operation for basic instructions.
Setup:
- Enable bsnmpd daemon by creating new config file "/etc/rc.conf.d/bsnmpd" with the following content:
bsnmpd_enable="YES" - Uncomment the following lines in "/etc/snmpd.config" file to enable required SNMP modules:
begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so"
begemotSnmpdModulePath."pf" = "/usr/lib/snmp_pf.so" - Start bsnmpd daemon with the following command:
/etc/rc.d/bsnmpd start - Setup a firewall rule to get access from Zabbix proxy or Zabbix server by SNMP (https://docs.opnsense.org/manual/firewall.html).
- Link the template to a host.
Zabbix configuration
No specific Zabbix configuration is required.
Macros used
| Name | Description | Default |
|---|---|---|
| {$IF.ERRORS.WARN} | Threshold of error packets rate for warning trigger. Can be used with interface name as context. |
2 |
| {$IF.UTIL.MAX} | Threshold of interface bandwidth utilization for warning trigger in %. Can be used with interface name as context. |
90 |
| {$IFCONTROL} | Macro for operational state of the interface for link down trigger. Can be used with interface name as context. |
1 |
| {$NET.IF.IFADMINSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.* |
| {$NET.IF.IFADMINSTATUS.NOT_MATCHES} | Ignore down(2) administrative status. |
^2$ |
| {$NET.IF.IFALIAS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFALIAS.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFDESCR.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFDESCR.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$NET.IF.IFNAME.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
`(^pflog[0-9.]*$ |
| {$NET.IF.IFOPERSTATUS.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
^.*$ |
| {$NET.IF.IFOPERSTATUS.NOT_MATCHES} | Ignore notPresent(6). |
^6$ |
| {$NET.IF.IFTYPE.MATCHES} | This macro is used in filters of network interfaces discovery rule. |
.* |
| {$NET.IF.IFTYPE.NOT_MATCHES} | This macro is used in filters of network interfaces discovery rule. |
CHANGE_IF_NEEDED |
| {$SNMP.TIMEOUT} | The time interval for SNMP availability trigger. |
5m |
| {$SOURCE.TRACKING.TABLE.UTIL.MAX} | Threshold of source tracking table utilization trigger in %. |
90 |
| {$STATE.TABLE.UTIL.MAX} | Threshold of state table utilization trigger in %. |
90 |
Template links
There are no template links in this template.
Discovery rules
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Network interfaces discovery | Discovering interfaces from IF-MIB. |
SNMP | opnsense.net.if.discovery Filter: AND- A: {#IFADMINSTATUS} MATCHES_REGEX - B: {#IFADMINSTATUS} NOT_MATCHES_REGEX - I: {#IFOPERSTATUS} MATCHES_REGEX - J: {#IFOPERSTATUS} NOT_MATCHES_REGEX - G: {#IFNAME} MATCHES_REGEX - H: {#IFNAME} NOT_MATCHES_REGEX - E: {#IFDESCR} MATCHES_REGEX - F: {#IFDESCR} NOT_MATCHES_REGEX - C: {#IFALIAS} MATCHES_REGEX - D: {#IFALIAS} NOT_MATCHES_REGEX - K: {#IFTYPE} MATCHES_REGEX - L: {#IFTYPE} NOT_MATCHES_REGEX |
Items collected
| Group | Name | Description | Type | Key and additional info |
|---|---|---|---|---|
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound packets discarded | MIB: IF-MIB The number of inbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.in.discards[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of inbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of inbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.in.errors[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Bits received | MIB: IF-MIB The total number of octets received on the interface, including framing characters. This object is a 64-bit version of ifInOctets. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.in[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound packets discarded | MIB: IF-MIB The number of outbound packets which were chosen to be discarded even though no errors had been detected to prevent their being deliverable to a higher-layer protocol. One possible reason for discarding such a packet could be to free up buffer space. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.out.discards[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound packets with errors | MIB: IF-MIB For packet-oriented interfaces, the number of outbound packets that contained errors preventing them from being deliverable to a higher-layer protocol. For character-oriented or fixed-length interfaces, the number of outbound transmission units that contained errors preventing them from being deliverable to a higher-layer protocol. Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.out.errors[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Bits sent | MIB: IF-MIB The total number of octets transmitted out of the interface, including framing characters. This object is a 64-bit version of ifOutOctets.Discontinuities in the value of this counter can occur at re-initialization of the management system, and at other times as indicated by the value of ifCounterDiscontinuityTime. |
SNMP | net.if.out[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Speed | MIB: IF-MIB An estimate of the interface's current bandwidth in units of 1,000,000 bits per second. If this object reports a value of |
SNMP | net.if.speed[{#SNMPINDEX}] Preprocessing: - MULTIPLIER: - DISCARD_UNCHANGED_HEARTBEAT: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Operational status | MIB: IF-MIB The current operational state of the interface. - The testing(3) state indicates that no operational packet scan be passed - If ifAdminStatus is down(2) then ifOperStatus should be down(2) - If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic - It should change todormant(5) if the interface is waiting for external actions (such as a serial line waiting for an incoming connection) - It should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state - It should remain in the notPresent(6) state if the interface has missing(typically, hardware) components. |
SNMP | net.if.status[{#SNMPINDEX}] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Interface type | MIB: IF-MIB The type of interface. Additional values for ifType are assigned by the Internet Assigned Numbers Authority (IANA), through updating the syntax of the IANAifType textual convention. |
SNMP | net.if.type[{#SNMPINDEX}] Preprocessing: - DISCARD_UNCHANGED_HEARTBEAT: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Rules references count | MIB: BEGEMOT-PF-MIB The number of rules referencing this interface. |
SNMP | net.if.rules.refs[{#SNMPINDEX}] |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed coming in on this interface. |
SNMP | net.if.in.pass.v4.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked coming in on this interface. |
SNMP | net.if.in.block.v4.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic passed | MIB: BEGEMOT-PF-MIB IPv4 bits per second passed going out on this interface. |
SNMP | net.if.out.pass.v4.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 traffic blocked | MIB: BEGEMOT-PF-MIB IPv4 bits per second blocked going out on this interface. |
SNMP | net.if.out.block.v4.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed coming in on this interface. |
SNMP | net.if.in.pass.v4.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked coming in on this interface. |
SNMP | net.if.in.block.v4.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv4 packets passed going out on this interface. |
SNMP | net.if.out.pass.v4.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv4 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv4 packets blocked going out on this interface. |
SNMP | net.if.out.block.v4.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed coming in on this interface. |
SNMP | net.if.in.pass.v6.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked coming in on this interface. |
SNMP | net.if.in.block.v6.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic passed | MIB: BEGEMOT-PF-MIB IPv6 bits per second passed going out on this interface. |
SNMP | net.if.out.pass.v6.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 traffic blocked | MIB: BEGEMOT-PF-MIB IPv6 bits per second blocked going out on this interface. |
SNMP | net.if.out.block.v6.bps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND - MULTIPLIER: |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed coming in on this interface. |
SNMP | net.if.in.pass.v6.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Inbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked coming in on this interface. |
SNMP | net.if.in.block.v6.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets passed | MIB: BEGEMOT-PF-MIB The number of IPv6 packets passed going out on this interface. |
SNMP | net.if.out.pass.v6.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| Network_interfaces | OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Outbound IPv6 packets blocked | MIB: BEGEMOT-PF-MIB The number of IPv6 packets blocked going out on this interface. |
SNMP | net.if.out.block.v6.pps[{#SNMPINDEX}] Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Packet filter running status | MIB: BEGEMOT-PF-MIB True if packet filter is currently enabled. |
SNMP | opnsense.pf.status |
| OPNsense | OPNsense: States table current | MIB: BEGEMOT-PF-MIB Number of entries in the state table. |
SNMP | opnsense.state.table.count |
| OPNsense | OPNsense: States table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'keep state' rules in the ruleset. |
SNMP | opnsense.state.table.limit |
| OPNsense | OPNsense: States table utilization in % | Utilization of state table in %. |
CALCULATED | opnsense.state.table.pused Expression: last("opnsense.state.table.count") * 100 / last("opnsense.state.table.limit") |
| OPNsense | OPNsense: Source tracking table current | MIB: BEGEMOT-PF-MIB Number of entries in the source tracking table. |
SNMP | opnsense.source.tracking.table.count |
| OPNsense | OPNsense: Source tracking table limit | MIB: BEGEMOT-PF-MIB Maximum number of 'sticky-address' or 'source-track' rules in the ruleset. |
SNMP | opnsense.source.tracking.table.limit |
| OPNsense | OPNsense: Source tracking table utilization in % | Utilization of source tracking table in %. |
CALCULATED | opnsense.source.tracking.table.pused Expression: last("opnsense.source.tracking.table.count") * 100 / last("opnsense.source.tracking.table.limit") |
| OPNsense | OPNsense: DHCP server status | MIB: HOST-RESOURCES-MIB The status of DHCP server process. |
SNMP | opnsense.dhcpd.status |
| OPNsense | OPNsense: DNS server status | MIB: HOST-RESOURCES-MIB The status of DNS server process. |
SNMP | opnsense.dns.status |
| OPNsense | OPNsense: Web server status | MIB: HOST-RESOURCES-MIB The status of lighttpd process. |
SNMP | opnsense.lighttpd.status |
| OPNsense | OPNsense: Packets matched a filter rule | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.match Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Packets with bad offset | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.bad.offset Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Fragmented packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.fragment Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Short packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.short Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Normalized packets | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.normalize Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Packets dropped due to memory limitation | MIB: BEGEMOT-PF-MIB True if the packet was logged with the specified packet filter reason code. The known codes are: match, bad-offset, fragment, short, normalize, and memory. |
SNMP | opnsense.packets.mem.drop Preprocessing: - CHANGE_PER_SECOND |
| OPNsense | OPNsense: Firewall rules count | MIB: BEGEMOT-PF-MIB The number of labeled filter rules on this system. |
SNMP | opnsense.rules.count |
| Status | OPNsense: SNMP agent availability | Availability of SNMP checks on the host. The value of this item corresponds to availability icons in the host list. Possible value: 0 - not available 1 - available 2 - unknown |
INTERNAL | zabbix[host,snmp,available] |
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High input error rate ( > {$IF.ERRORS.WARN:"{#IFNAME}"} for 5m) | Recovers when below 80% of {$IF.ERRORS.WARN:"{#IFNAME}"} threshold. |
{TEMPLATE_NAME:net.if.in.errors[{#SNMPINDEX}].min(5m)}>{$IF.ERRORS.WARN:"{#IFNAME}"}Recovery expression: {TEMPLATE_NAME:net.if.in.errors[{#SNMPINDEX}].max(5m)}<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8 |
WARNING | Depends on: - OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High inbound bandwidth usage ( > {$IF.UTIL.MAX:"{#IFNAME}"}% ) | The network interface utilization is close to its estimated maximum bandwidth. |
({TEMPLATE_NAME:net.if.in[{#SNMPINDEX}].avg(15m)}>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*{TEMPLATE_NAME:net.if.speed[{#SNMPINDEX}].last()}) and {TEMPLATE_NAME:net.if.speed[{#SNMPINDEX}].last()}>0 Recovery expression: {TEMPLATE_NAME:net.if.in[{#SNMPINDEX}].avg(15m)}<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*{TEMPLATE_NAME:net.if.speed[{#SNMPINDEX}].last()} |
WARNING | Depends on: - OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High output error rate ( > {$IF.ERRORS.WARN:"{#IFNAME}"} for 5m) | Recovers when below 80% of {$IF.ERRORS.WARN:"{#IFNAME}"} threshold. |
{TEMPLATE_NAME:net.if.out.errors[{#SNMPINDEX}].min(5m)}>{$IF.ERRORS.WARN:"{#IFNAME}"}Recovery expression: {TEMPLATE_NAME:net.if.out.errors[{#SNMPINDEX}].max(5m)}<{$IF.ERRORS.WARN:"{#IFNAME}"}*0.8 |
WARNING | Depends on: - OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: High outbound bandwidth usage ( > {$IF.UTIL.MAX:"{#IFNAME}"}% ) | The network interface utilization is close to its estimated maximum bandwidth. |
({TEMPLATE_NAME:net.if.out[{#SNMPINDEX}].avg(15m)}>({$IF.UTIL.MAX:"{#IFNAME}"}/100)*{TEMPLATE_NAME:net.if.speed[{#SNMPINDEX}].last()}) and {TEMPLATE_NAME:net.if.speed[{#SNMPINDEX}].last()}>0 Recovery expression: {TEMPLATE_NAME:net.if.out[{#SNMPINDEX}].avg(15m)}<(({$IF.UTIL.MAX:"{#IFNAME}"}-3)/100)*{TEMPLATE_NAME:net.if.speed[{#SNMPINDEX}].last()} |
WARNING | Depends on: - OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Ethernet has changed to lower speed than it was before | This Ethernet connection has transitioned down from its known maximum speed. This might be a sign of autonegotiation issues. Ack to close. |
{TEMPLATE_NAME:net.if.speed[{#SNMPINDEX}].change()}<0 and {TEMPLATE_NAME:net.if.speed[{#SNMPINDEX}].last()}>0 and ( {TEMPLATE_NAME:net.if.type[{#SNMPINDEX}].last()}=6 or {TEMPLATE_NAME:net.if.type[{#SNMPINDEX}].last()}=7 or {TEMPLATE_NAME:net.if.type[{#SNMPINDEX}].last()}=11 or {TEMPLATE_NAME:net.if.type[{#SNMPINDEX}].last()}=62 or {TEMPLATE_NAME:net.if.type[{#SNMPINDEX}].last()}=69 or {TEMPLATE_NAME:net.if.type[{#SNMPINDEX}].last()}=117 ) and {TEMPLATE_NAME:net.if.status[{#SNMPINDEX}].last()}<>2 Recovery expression: ({TEMPLATE_NAME:net.if.speed[{#SNMPINDEX}].change()}>0 and {TEMPLATE_NAME:net.if.speed[{#SNMPINDEX}].last(#2)}>0) or {TEMPLATE_NAME:net.if.status[{#SNMPINDEX}].last()}=2 |
INFO | Depends on: - OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down |
| OPNsense: Interface [{#IFNAME}({#IFALIAS})]: Link down | This trigger expression works as follows: 1. Can be triggered if operations status is down. 2. {$IFCONTROL:"{#IFNAME}"}=1 - user can redefine Context macro to value - 0. That marks this interface as not important. No new trigger will be fired if this interface is down. |
{$IFCONTROL:"{#IFNAME}"}=1 and {TEMPLATE_NAME:net.if.status[{#SNMPINDEX}].last()}=2 |
AVERAGE | |
| OPNsense: Packet filter is not running | Please check PF status. |
{TEMPLATE_NAME:opnsense.pf.status.last()}<>1 |
HIGH | |
| OPNsense: State table usage more than {$STATE.TABLE.UTIL.MAX}. | Please check the number of connections. |
{TEMPLATE_NAME:opnsense.state.table.pused.min(#3)}>{$STATE.TABLE.UTIL.MAX} |
WARNING | |
| OPNsense: Source tracking table usage more than {$SOURCE.TRACKING.TABLE.UTIL.MAX}. | Please check the number of sticky connections. |
{TEMPLATE_NAME:opnsense.source.tracking.table.pused.min(#3)}>{$SOURCE.TRACKING.TABLE.UTIL.MAX} |
WARNING | |
| OPNsense: DHCP server is not running | Please check DHCP server settings. |
{TEMPLATE_NAME:opnsense.dhcpd.status.nodata(5m)}=1 |
AVERAGE | Depends on: - OPNsense: No SNMP data collection |
| OPNsense: DNS server is not running | Please check DNS server settings. |
{TEMPLATE_NAME:opnsense.dns.status.nodata(5m)}=1 |
AVERAGE | Depends on: - OPNsense: No SNMP data collection |
| OPNsense: Web server is not running | Please check lighttpd service status. |
{TEMPLATE_NAME:opnsense.lighttpd.status.nodata(5m)}=1 |
AVERAGE | Depends on: - OPNsense: No SNMP data collection |
| OPNsense: No SNMP data collection | SNMP is not available for polling. Please check device connectivity and SNMP settings. |
{TEMPLATE_NAME:zabbix[host,snmp,available].max({$SNMP.TIMEOUT})}=0 |
WARNING |
Feedback
Please report any issues with the template at https://support.zabbix.com.