In context menu of that node you can select "Execute server script" and try your script there; The node that you right-clicked will be available as $node, so all the attributes will be there.
You can do
to see what's actually in there.
Match operation ~= looks to be correct, but you could just use simple comparison with == , then you'd not need to escape with backslashes.
In out-of-the-box templates there's e.g. SNMP->UPS->APC that has automatic apply rule that is checking some SNMP data.
The other debugging approach is to use
PollerTrace("your text");
or
trace(0, "your text");
First one will produce debug output in nxmc when you do Poll-> Configuration poll from node context menu.
Second will put debug to server log (at debug level 0 in this example)
You can do
Code Select
println $node->snmpOID;
to see what's actually in there.
Match operation ~= looks to be correct, but you could just use simple comparison with == , then you'd not need to escape with backslashes.
In out-of-the-box templates there's e.g. SNMP->UPS->APC that has automatic apply rule that is checking some SNMP data.
The other debugging approach is to use
PollerTrace("your text");
or
trace(0, "your text");
First one will produce debug output in nxmc when you do Poll-> Configuration poll from node context menu.
Second will put debug to server log (at debug level 0 in this example)