[Fusioninventory-devel] SNMP mapping issues

Guillaume Rousse guillomovitch at gmail.com
Tue Aug 13 14:10:50 UTC 2013


First issue: ifaddr variable.

It is supposed to define IP addresses for each device port. Here is 
current definition of this variable, across various models:
- 487 models map it to .1.3.6.1.2.1.4.20.1.2
- 127 models map it to .1.3.6.1.2.1.4.20.1.1
- 15 models map it to .1.3.6.1.2.1.4.21.1.7.10.10.0.0
- 2 models map it to .1.3.6.1.4.1.258.403.1.6.1.2.0

On at least 3 different models, for which I have walk samples, using 
.1.3.6.1.2.1.4.20.1.1 was plainly wrong, and fixing the models to use 
.1.3.6.1.2.1.4.20.1.2 instead gives immediatly expected results. See the 
following commit for details:
https://github.com/fusinv/fusioninventory-agent/commit/bce471307f8e2941b00cd33ee6755f584716d14e

However, as:
- this is supposed to be a standard SNMP oid,
-.1.3.6.1.2.1.4.20.1.1 is also used to map ipAdEntAddr in 541 models

I'm rather inclined that's not worth fixing models, and than the agent 
would behave better here just by ignoring model-provided information, 
and relying on hardcoded logic...

Second issue: lldp* variables.

The following variables are defined in models:
- lldpLocChassisId
- lldpRemChassisId
- lldpRemSysDesc
- lldpRemSysName
- lldpRemPortId,
- lldpRemPortDesc

They are defined as mono-valued variable in all models but one 
(Networking2312). However, once the agent retrieved the values for them, 
using either get or walk operation, according to the model, those 
variables are always used as multi-valued (see the while loop, in see 
setConnectedDevicesUsingLLDP() function, in 
FusionInventory::Agent::Tools::Hardware::Generic). For obvious reasons, 
it doesn't work.

Rather than 'fixing' models, I made the agent ignore what the model say, 
and retrieve their values using walk operation. On the various test case 
I have, this immediatly gave better results. See for instance the 
difference for the alcatel.t test case, in the following commit:
https://github.com/fusinv/fusioninventory-agent/commit/adc7792767937da8e057b6dea2af51858ac7c5f0

Additional minor issue: lldpLocChassisId is never used in the agent.

Basically, those SNMP models are supposed to help the agent to take 
decisions. However, in both case, the agent takes better decision by 
ignoring some informations provided by the model...
-- 
Guillaume



More information about the Fusioninventory-devel mailing list