The solution is simple using the functions
<?xml version="1.0" ?> **** 57 1345886 If_1_Statusoid_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() \ \ **to sweetdude**: your function probe did not work probably because you used 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