So I need to monitor statuses of several VPN tunnels. FortiGate has a great OID for that, fgVpnTunEntStatus (1.3.6.1.4.1.12356.101.12.2.2.1.20).
snmpwalk gives me the expected output:
or
In Zabbix I make an item prototype:
Now when I run a Test, I get the response:
It's the same when SNMP OID is replaced with a numeric representation:
If I add a plain text widget on a dashboard, the VPN tunnel status [tunnel name] are listed, but the status is "not supported".
If I substitute the {#SNMPINDEX} in SNMP OID with a real index, for example .20.1, the test runs successfully and I get a result "2".
If I substitute the Type of information with Text, the test still fails, in the plain text widget the items are marked as "not supported", but they all return a value "1"

The VPN Tunnel status item prototype is made under Network interfaces discovery rule:
I also tried to make a new discovery rule for VPN interfaces, from there I get the following results:
From there I can see that the numbers added to the OID really are called with a variable #SNMPINDEX.
As this is my first time with Zabbix, I'm a bit perplexed...
snmpwalk gives me the expected output:
Code:
[root@zabbix ~]# snmpwalk -v2c -c public 10.10.10.254 1.3.6.1.4.1.12356.101.12.2 .2.1.20 SNMPv2-SMI::enterprises.12356.101.12.2.2.1.20.20.1 = INTEGER: 2 SNMPv2-SMI::enterprises.12356.101.12.2.2.1.20.21.1 = INTEGER: 2
Code:
[root@zabbix ~]# snmpwalk -v2c -c public 10.10.10.254 FORTINET-FORTIGATE-MIB::fg VpnTunEntStatus FORTINET-FORTIGATE-MIB::fgVpnTunEntStatus.20.1 = INTEGER: up(2) FORTINET-FORTIGATE-MIB::fgVpnTunEntStatus.21.1 = INTEGER: up(2)
Code:
Name: VPN tunnel status[{#SNMPVALUE}]
Type: SNMP agent
Key: fgVpnTunEntStatus[{#SNMPVALUE}]
SNMP OID: FORTINET-FORTIGATE-MIB::fgVpnTunEntStatus.{#SNMPINDEX}
Type of information: Numeric (unsigned)
Code:
snmp_parse_oid(): cannot parse OID "FORTINET-FORTIGATE-MIB::fgVpnTunEntStatus.{#SNMPINDEX}"
Code:
snmp_parse_oid(): cannot parse OID "10.10.10.254 1.3.6.1.4.1.12356.101.12.2 .2.1.20.{#SNMPINDEX}".
If I substitute the {#SNMPINDEX} in SNMP OID with a real index, for example .20.1, the test runs successfully and I get a result "2".
If I substitute the Type of information with Text, the test still fails, in the plain text widget the items are marked as "not supported", but they all return a value "1"
The VPN Tunnel status item prototype is made under Network interfaces discovery rule:
Code:
Key: ifName
SNMP OID: discovery[{#SNMPVALUE},.1.3.6.1.2.1.31.1.1.1.1]
Code:
discovery[{#SNMPVALUE},.1.3.6.1.4.1.12356.101.12.2.2.1.20]
[{"{#SNMPINDEX}":"20.1","{#SNMPVALUE}":"2"},{"{#SNMPINDEX}":"21.1","{#SNMPVALUE}":"2"},...
As this is my first time with Zabbix, I'm a bit perplexed...
Comment