Invalid OID. What's wrong with this function?

I’m trying to figure out what is wrong with the following function. When I use string_size to get the string size of the OID, it works properly:

string_size((oid(concatenate(“iso.org.dod.internet.private.enterprises.trango.tbw.m5830sap.su.suInfoTable.suInfoEntry.suAssociation.”,device_property(“CustomField3”)),30,300,device_property(“CustomField2”))))

However, when I just want to retrieve the OID itself, Dude reports it as an invalid OID. All I did was remove string_size from the function. What is wrong?

((oid(concatenate(“iso.org.dod.internet.private.enterprises.trango.tbw.m5830sap.su.suInfoTable.suInfoEntry.suAssociation.”,device_property(“CustomField3”)),30,300,device_property(“CustomField2”))))


The Device Custom Fields are:
CustomField2 = 10.0.0.20
CustomField3 = 5

string_size() correctly returns size of string “invalid oid” :slight_smile:

You should double check that you have Trango mibs loaded in the Dude. Dude
does not recognize result of concatenation as valid oid. Check what output
you get when you put just:

concatenate(“iso.org.dod.internet.private.enterprises.trango.tbw.m5830sap.su.suInfoTable.suInfoEntry.suAssociation.”,device_property(“CustomField3”))

Are you sure the string-size functions does not simply report the number of characters in the returned error-message of the (assumed here) incorrect formula?

[edit] Damn, I could have looked so smart if I’d just have pressed ‘Submit’ a little faster! :wink: [/edit]

I think you have an extra dot ‘.’ at the end. Or missing something, like a 0.

BR

Ricardo Mota

Uldis:

String size is working correctly. The OID for su association either contains:

associated (1)
or
notAssociated (0)

Associated is 14 characters and notAssociated is 17 characters. When I use the string_size function noted above, I get 14 or 17 returned depending upon if the subsriber unit is associated or not. So Dude seems to accept a concatenated OID if you pass the result to string_size. I actually have a probe setup using this function. :smiley:

For your test:
concatenate(“iso.org.dod.internet.private.enterprises.trango.tbw.m5830sap.su.suInfoTable.suInfoEntry.suAssociation.”,device_property(“CustomField3”))

returns:
iso.org.dod.internet.private.enterprises.trango.tbw.m5830sap.su.suInfoTable.suInfoEntry.suAssociation.5

OK..Not sure what is going on. I messed around some more and tried the original function that wasn’t working above and now its working :open_mouth:

((oid(concatenate(“iso.org.dod.internet.private.enterprises.trango.tbw.m5830sap.su.suInfoTable.suInfoEntry.suAssociation.”,device_property(“CustomField3”)),30,300,device_property(“CustomField2”))))