[ZBX-22396] SNMP Walk to JSON preprocessing does not work with different size OIDs before index Created: 2023 Feb 22 Updated: 2024 Apr 10 Resolved: 2023 Feb 28 |
|
| Status: | Closed |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Proxy (P), Server (S) |
| Affects Version/s: | 6.4.0rc1 |
| Fix Version/s: | 6.4.0rc3, 6.4 (plan) |
| Type: | Problem report | Priority: | Critical |
| Reporter: | Kaspars Mednis | Assignee: | Dmitrijs Goloscapovs (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Team: | |
| Sprint: | Sprint 97 (Feb 2023) |
| Story Points: | 0.5 |
| Description |
|
Steps to reproduce: .1.3.6.1.2.1.31.1.1.1.1.11001 = STRING: Fa3/0/1 .1.3.6.1.2.1.31.1.1.1.1.11002 = STRING: Fa3/0/2 .1.3.6.1.2.1.31.1.1.1.1.11003 = STRING: Fa3/0/3 .1.3.6.1.2.1.31.1.1.1.1.11004 = STRING: Fa3/0/4 .1.3.6.1.2.1.31.1.1.1.18.11001 = STRING: Router .1.3.6.1.2.1.31.1.1.1.18.11002 = STRING: Printer .1.3.6.1.2.1.31.1.1.1.18.11003 = STRING: Smart TV .1.3.6.1.2.1.31.1.1.1.18.11004 = STRING: Unused Field name: {#IFNAME} OID prefix .1.3.6.1.2.1.31.1.1.1.1 [
{
"{#SNMPINDEX}": ".11003",
"{#IFNAME}": "Smart TV"
},
{
"{#SNMPINDEX}": ".11002",
"{#IFNAME}": "Printer"
},
{
"{#SNMPINDEX}": ".11004",
"{#IFNAME}": "Unused"
},
{
"{#SNMPINDEX}": "11004",
"{#IFNAME}": "Fa3/0/4",
"{#IFALIAS}": "Unused"
},
{
"{#SNMPINDEX}": "11002",
"{#IFNAME}": "Fa3/0/2",
"{#IFALIAS}": "Printer"
},
{
"{#SNMPINDEX}": "11001",
"{#IFNAME}": "Fa3/0/1",
"{#IFALIAS}": "Router"
},
{
"{#SNMPINDEX}": "11003",
"{#IFNAME}": "Fa3/0/3",
"{#IFALIAS}": "Smart TV"
},
{
"{#SNMPINDEX}": ".11001",
"{#IFNAME}": "Router"
}
]
4. This happens because .1.3.6.1.2.1.31.1.1.1.1.11001 and .1.3.6.1.2.1.31.1.1.1.18.1100 has different length Expected:
[
{
"{#SNMPINDEX}": "11004",
"{#IFNAME}": "Fa3/0/4",
"{#IFALIAS}": "Unused"
},
{
"{#SNMPINDEX}": "11002",
"{#IFNAME}": "Fa3/0/2",
"{#IFALIAS}": "Printer"
},
{
"{#SNMPINDEX}": "11001",
"{#IFNAME}": "Fa3/0/1",
"{#IFALIAS}": "Router"
},
{
"{#SNMPINDEX}": "11003",
"{#IFNAME}": "Fa3/0/3",
"{#IFALIAS}": "Smart TV"
}
]
|
| Comments |
| Comment by Kaspars Mednis [ 2023 Feb 22 ] |
|
Adding a trailing dot at the end of OID will fix the problem Field name: {#IFNAME} OID prefix .1.3.6.1.2.1.31.1.1.1.1. This must be fixed or properly documented. If dot is required, frontend must give a validation error. Previous implementation of SNMP discovery worked without trailing dots, a lot of long-time Zabbix users are used to this oid format discovery{#IFOPERSTATUS},1.3.6.1.2.1.2.2.1.8,{#IFADMINSTATUS},1.3.6.1.2.1.2.2.1.7,{#IFALIAS},1.3.6.1.2.1.31.1.1.1.18,{#IFNAME},1.3.6.1.2.1.31.1.1.1.1,{#IFDESCR},1.3.6.1.2.1.2.2.1.2,{#IFTYPE},1.3.6.1.2.1.2.2.1.3
|
| Comment by Dmitrijs Goloscapovs (Inactive) [ 2023 Feb 27 ] |
|
Available in versions:
|