zabbix-extra-network: interface discovery duplicate IF
Open
Nobody has claimed this yet.
bug
release/25.12
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Package Name
zabbix-extra-network
Maintainer
@danielfdickinson
OpenWrt Version
25.12.5
OpenWrt Target/Subtarget
ipq40xx/generic
Steps to Reproduce
On my LTE router, the same "l3_device" (wwan0) is referenced in two ubus "interface"s (wan and wan_4):
# ubus call network.interface dump
{
"interface": [
{
"interface": "lan",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 183929,
"l3_device": "br-lan",
"proto": "static",
"device": "br-lan",
"updated": [
"addresses"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "10.120.12.1",
"mask": 24
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
{
"address": "fd5c:958a:a9e5::",
"mask": 60,
"local-address": {
"address": "fd5c:958a:a9e5::1",
"mask": 60
}
}
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
}
},
{
"interface": "lan_gw_dhcp",
"up": false,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"proto": "dhcp",
"device": "lan1",
"data": {
}
},
{
"interface": "loopback",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 183929,
"l3_device": "lo",
"proto": "static",
"device": "lo",
"updated": [
"addresses"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "127.0.0.1",
"mask": 8
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
}
},
{
"interface": "wan",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": false,
"uptime": 3916,
"l3_device": "wwan0",
"proto": "qmi",
"updated": [
"data"
],
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
],
"dns-server": [
"86.54.11.1"
],
"dns-search": [
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
"cid_4": "19",
"pdh_4": "959771040"
}
},
{
"interface": "wan_4",
"up": true,
"pending": false,
"available": true,
"autostart": true,
"dynamic": true,
"uptime": 3915,
"l3_device": "wwan0",
"proto": "dhcp",
"device": "wwan0",
"metric": 0,
"dns_metric": 0,
"delegation": true,
"ipv4-address": [
{
"address": "10.60.203.68",
"mask": 29
}
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
{
"target": "0.0.0.0",
"mask": 0,
"nexthop": "10.60.203.69",
"source": "10.60.203.68/32"
}
],
"dns-server": [
],
"dns-search": [
],
"neighbors": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
"213.94.78.16",
"213.94.78.17"
],
"dns-search": [
],
"neighbors": [
]
},
"data": {
"zone": "wan",
"dhcpserver": "10.60.203.69",
"hostname": "prokschg",
"leasetime": 600,
"zone": "wan"
}
}
]
}
Actual Behaviour
", \"{#NET}\":\""..intf.interface.."\"},";end;list=string.gsub(list,",$","");print(list.."]}")'
{"data":[{"{#IF}":"br-lan", "{#NET}":"lan"},{"{#IF}":"lan1", "{#NET}":"lan_gw_dhcp"},{"{#IF}":"lo", "{#NET}":"loopback"},{"{#IF}":"wwan0", "{#NET}":"wan"},{"{#IF}":"wwan0", "{#NET}":"wan_4"}]}
This results in zabbix errors when doing discovery:
Cannot create item: item with the same key "net.if.in[wwan0]" already exists.
Cannot create item: item with the same key "net.if.out[wwan0]" already exists.
Confirmation Checklist
- The package is maintained in this repository.
- I understand that issues related to the base OpenWrt repository or LuCI repository will be closed.
- I am reporting an issue for OpenWrt, not an unsupported fork.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the zabbix-extra-network interface-discovery implementation and the Lua command shown in the report. Reproduce the ubus dump with two interfaces sharing wwan0, then trace how discovery emits {#IF} and {#NET}. Done means discovery no longer creates duplicate net.if.in/out items for the same device.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- networking, observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100