recently I came across strange Mvel snmpGet results. I dont know if Idoing everything alright or there is something I miss.
If someone could confirm a bug or point my mistake please do so.
Problematic code part is here:
var oid_ap_mac = "1.3.6.1.4.1.14179.2.2.1.1.1."+bsnAPDot3MacAddress.toString();
ap_mac_response = snmpGet(oid_ap_mac);
ap_mac_instance = ap_mac_response.getResult();
ap_mac_value = ap_mac_instance.getValue();
mvelInfo({"ap_mac_value==",ap_mac_value,"ap_mac_instance==",ap_mac_instance});
and the output in karaf log is:
42 | 185 - com.ca.im.data-mgmt.common - 3.6.0.RELEASE-283 | | MVEL info: ap_mac_value==,>ϊ�@ ap_mac_instance==SNMPResponseObject [value=,>ϊ�@, type=OCTET_STRING, index=null]
Note not printable characters above.
First I though there is a problem with agent on a device BUT:
- DCDEBUG search :
uest [Initial Q position: 0 / Delay: 0 ms], Q Size: 0: GET[requestID=301768627, errorStatus=Success(0), errorIndex=50, VBS[1.3.6.1.4.1.14179.2.2.1.1.1.192.37.92.223.67.96 = Null]]
Oct 05 06:06:27.472: Received SNMP response [Resp Time: 37 ms / Trans Time: 37 ms] evResponse:RESPONSE[requestID=301768627, errorStatus=Success(0), errorIndex=0, VBS[1.3.6.1.4.1.14179.2.2.1.1.1.192.37.92.223.67.96 = c0:25:5c:df:43:60]] evReque
- SNMPwalk also is readable format:
SNMPv2-SMI::enterprises.14179.2.2.1.1.1.28.222.167.239.246.128 = Hex-STRING: 1C DE A7 EF F6 80
And now best part. When I do snmpGetTable 1.3.6.1.4.1.14179.2.2.1.1.1 I get this in karaf log
SNMPGET TABLE RESULT[SNMPResponseObject [value=28.222.167.239.232.0, type=OCTET_STRING, index=28.222.167.239.232.0],
SNMPResponseObject [value=192.37.92.223.67.96, type=OCTET_STRING, index=192.37.92.223.67.96]
SNMPResponseObject [value=28.222.167.239.243.192, type=OCTET_STRING, index=28.222.167.239.243.192],
SNMPResponseObject [value=28.222.167.239.244.192, type=OCTET_STRING, index=28.222.167.239.244.192],
SNMPResponseObject [value=28.222.167.239.244.224, type=OCTET_STRING, index=28.222.167. 239.244.224],
so this one looks alright. How come? Any ideas?
what do I miss here?