Interface description in notification

Thanks to gsandul for posting how to get the description of the interface in the notification when an interface goes down… I am just copying it from another post.

<?xml version="1.0" ?> 57 1345886 If_1_Status oid_raw("1.3.6.1.2.1.2.2.1.8.1") **** Check the status of interface number 1 <?xml version="1.0" ?> 57 1345962 If_1_Descr oid("1.3.6.1.2.1.2.2.1.2.1") **** Description of an interface \ \ <?xml version="1.0" ?> 13 1345894 If_1_Status 8 If_1_Status() if (If_1_Status() = 1, "", concatenate(" Warning Interface ", If_1_Descr(), " is down")) If_1_Status()

Note: You should create 2 functions and 1 probe for each monitored interface index.
it looks annoying if you have to monitor many oids, but you can change oids and funtions names directly in XML and then copy-paste it in functions or probes.

You also may avoid second function, then the probe will look like

<?xml version="1.0" ?> 13 1345894 If_1_Status 8 If_1_Status() if (If_1_Status() = 1, "", concatenate(" Warning Interface ", oid("1.3.6.1.2.1.2.2.1.2.1") , " is down")) If_1_Status() \ \ If a function probe doesn't work you can try OID_RAW !!! oid("1.3.6.1.2.1.2.2.1.8.1") it returns string "up (1)" oid_raw("1.3.6.1.2.1.2.2.1.8.1") returns 1

Thanks again gsandul excellent work.

Woops crap I ment to post this in the probe thread.