NetXMS Support Forum

English Support => General Support => Topic started by: tolimanjo on October 13, 2019, 04:16:05 AM

Title: Help with new SNMP trap transformation feature in 3.0
Post by: tolimanjo on October 13, 2019, 04:16:05 AM
Trying to do a transformation on a trap parameter. Have tried doing it this way:

oid = $1;
status = $2;
newStatus = "unknown";

switch (status)
{
   case "1"
      newStatus = "up";
      break;
   case "2":
      newStatus = "down";
      break;
}

return %(oid, newStatus);


It doesn't appear to work though, so how should I reference (and return) the parameter values?

Thanks.