From: Peter W. <pet...@gm...> - 2009-10-23 12:24:31
|
Hi Buchan, Thanks for your response. I do have a column now that shows 1 error for port 18. This is OK. But I want to make sure I understand you correctly before I shout HOORAY!... From the Cisco-manpage: connUnitPortStatCountInvalidCRC (1.3.6.1.3.94.4.5.1.40) Count of frames received with invalid CRC. This count is part of the Link Error Status Block (LESB). (FC-PH 29.8). Loop ports should not count CRC errors passing through when monitoring. This is a Fibre Channel-only statistic. Syntax Description OCTET STRING (SIZE (8)) ---> Does this mean that I have to script all 8 hex-parts? Now, I did only the following, which corresponds the real value: connUnitPortStatCountInvalidCRC1B : SUBSTR: {connUnitPortStatCountInvalidCRC} 7 1 connUnitPortStatCountInvalidCRC1H : UNPACK: {connUnitPortStatCountInvalidCRC1B} H2 IntconnUnitPortStatCountInvalidCRC : CONVERT: {connUnitPortStatCountInvalidCRC1H} hex But when the value increases and goed beyond FF (I would say 256) I would have do do some MATH to represent the actual error count? There, where you performed some REGSUB-actions? Regards, Peter 2009/10/23 Buchan Milne <bg...@st...> > > > SNMPv2-SMI::experimental.94.4.5.1.40.16.0.0.13.236.25.211.23.0.0.0.0.0.0.0. > >0.18 = Hex-STRING: 00 00 00 00 00 00 00 01 <=== One CRC error! > > > > Do you have any hints/suggestions? > > I am not sure if there is a more efficient way to do this, but I dealt with > Hex- > String values in a test I haven't yet made available (as it will probably > cause the all-clear-tests issue on version of devmon without another local > change I am testing on many routers). In the example here, I am converting > the > cipsStaticCryptomapPeerB OID, which looks like this: > > CISCO-SMI::ciscoExperiment.62.1.2.3.3.1.4.5.99.105.115.99.111.10 = > Hex-STRING: > 41 3D 88 04 > > to a printable string in the cipsStaticCryptomapPeer OID: > > $ cat /usr/share/devmon/templates/cisco-2811/vpn/oids > cipsStaticCryptomapType : 1.3.6.1.4.1.9.10.62.1.2.3.3.1.2 : branch > cipsStaticCryptomapDescr : 1.3.6.1.4.1.9.10.62.1.2.3.3.1.3 : branch > cipsStaticCryptomapPeerB : 1.3.6.1.4.1.9.10.62.1.2.3.3.1.4 : branch > cipsStaticCryptomapNumPeers : 1.3.6.1.4.1.9.10.62.1.2.3.3.1.5 : branch > > $ cat /usr/share/devmon/templates/cisco-2811/vpn/transforms > cipsStaticCryptomapPeerp1B : SUBSTR :{cipsStaticCryptomapPeerB} 0 1 > cipsStaticCryptomapPeerp2B : SUBSTR :{cipsStaticCryptomapPeerB} 1 1 > cipsStaticCryptomapPeerp3B : SUBSTR :{cipsStaticCryptomapPeerB} 2 1 > cipsStaticCryptomapPeerp4B : SUBSTR :{cipsStaticCryptomapPeerB} 3 1 > > cipsStaticCryptomapPeerp1H : UNPACK : {cipsStaticCryptomapPeerp1B} H2 > cipsStaticCryptomapPeerp2H : UNPACK : {cipsStaticCryptomapPeerp2B} H2 > cipsStaticCryptomapPeerp3H : UNPACK : {cipsStaticCryptomapPeerp3B} H2 > cipsStaticCryptomapPeerp4H : UNPACK : {cipsStaticCryptomapPeerp4B} H2 > > cipsStaticCryptomapPeerp1 : CONVERT : {cipsStaticCryptomapPeerp1H} hex > cipsStaticCryptomapPeerp2 : CONVERT : {cipsStaticCryptomapPeerp2H} hex > cipsStaticCryptomapPeerp3 : CONVERT : {cipsStaticCryptomapPeerp3H} hex > cipsStaticCryptomapPeerp4 : CONVERT : {cipsStaticCryptomapPeerp4H} hex > > cipsStaticCryptomapPeer : REGSUB : {cipsStaticCryptomapPeerB} > /.*/{cipsStaticCryptomapPeerp1}.{cipsStaticCryptomapPeerp2}. > {cipsStaticCryptomapPeerp3}.{cipsStaticCryptomapPeerp4}/ > > > If you need all 8 hex pairs, you could need 8 SUBSTR, 8 UNPACK, and 8 > CONVERT > transforms. If you only need the last value, you could get away with just > one > of each. > > I plan on adding some better operators to automatically convert from common > SNMP types (or, possibly some automatic conversion of types). > > > Regards, > Buchan > |