I am not exactly sure what you are trying here but Device.Name is a built in function that returns 1.3.6.1.2.1.1.5.0, the system name, would that work?
The function dev_name is exactly
if(string_size(oid(“iso.org.dod.internet.mgmt.mib-2.system.sysName.0”)),oid(“iso.org.dod.internet.mgmt.mib-2.system.sysName.0”),“ghosting”)
It looks like you are trying to find device.name in the oid 1.3.6.1.2.1.2.2.1.2 so I can’t test since I don’t have a system where the interface is the same name as the device name but it might work like this.
[array_find(oid_column(“1.3.6.1.2.1.2.2.1.2”),dev_name())]
Have you tried device_property(“Name”) to return the device name?
I’m running version 4b3 on a Windows server and am using device_property(“CustomField1”) and device_property(“CustomField2”) to extract device information for use as parameters for some function probes.