I’m attempting to create a probe that tells when a link is up or down on a Ceragon IP 10 and would like some help on where to start. I’ve started out trying to use SNMP with:
oid: iso.org.dod.internet.mgmt.mib-2.interfaces.ifTable.ifEntry.ifOperStatus.1
oid type: integer
Compare Method: ==
Integer Value: 1
Any help would be appreciated.
Since your are trying to identify UP or Down Status you will have to manually add the correct OID of the interface you are interested in.
Make a function that returns true if the OID is found and false if the OID is not found. This way the function will not work on devices that don’t have the interesting OID. It also lets you know when the device is not responding as well as when the OID Value is wrong. That part is sorted out in the error line of the Probe.
SNMPv2 has interface status under the same branch so it doesn’t matter who the vendor if they support SNMPv2 is they should populate the same OID. Remember to replace the OID with the correct one for the interface you want to watch.
OID vs OID_RAW; You can put the OID like so [oid(“1.3.6.1.2.1.2.2.1.8.10101”)] on the appearance of a link label and it should show “up (1)” or “down (2)” whereas putting [oid_raw(“1.3.6.1.2.1.2.2.1.8.10101”)] on the appearance of a link label should show “1” or “2”.
OID 1.3.6.1.2.1.2.2.1.8 is where the Operational status of every interface is. Use SNMP Walk to verify the OID of the interface you are interested in for example 1.3.6.1.2.1.2.2.1.8.10101 is g1/0/1 on a cisco 24 port switch.
Function;
NAME: intG1test
CODE: if(string_size(oid("1.3.6.1.2.1.2.2.1.8.10101 ", 10 ,5)), oid_raw(“1.3.6.1.2.1.2.2.1.8.10101”,10,5),“False”)
Probe;
NAME: intG1status
TYPE: Function
Available: intG1test() <>“False”
Error: if(intG1test()<>“False”,if(intG1test()=1,“”,“G1 interface down”),“Can’t Read Int G1 at all!”)
If you plan to graph it put intG1test() in Value and anything in Unit. It is 1 or 2 so not really much to graph.
You can put your function in the appearance of a device and if it is in correct and in context it will show a value. This is a good troubleshooting step for any time you want to test if your new function works, just put it in the appearance of the device. [intG1test()] in appearance should show a value if it is working.
HTH,
Lebowski