Hi Viktor and co
Have a NetXMS 2.0.1 system in Server/Remote Agent w/Sites configuration
Have a simple data transformation question.
I'm trying to monitor temperature of some Mikrotik routerboards with SNMP via .1.3.6.1.4.1.14988.1.1.3.10.0
I need to transform the value that the Mikrotik reports by dividing the value by 10.
I've entered the following values in the Transformation option.
Simple Delta
sub main()
{
return $1 / 10;
}
Test returns the correct results however values received by in the Last Values tab or DCI History return results of 0
Anything I'm missing here ?
Thanks
Hi!
return $1/10;
Is enough actually, you dont need to declare an explicit main() method/function.
See this: https://wiki.netxms.org/wiki/UM:NetXMS_Scripting_Language_(NXSL)#Script_entry_point
As for why you are seeing 0 in last values, you have "Simple delta" as delta calculation enabled.
Set delta calculation to None, and it will work.
$1/10
will work as well (note missing ";" in the end, that's on purpose)
Quote from: tomaskir on February 02, 2016, 02:10:25 PM
Hi!
return $1/10;
Is enough actually, you dont need to declare an explicit main() method/function.
See this: https://wiki.netxms.org/wiki/UM:NetXMS_Scripting_Language_(NXSL)#Script_entry_point
As for why you are seeing 0 in last values, you have "Simple delta" as delta calculation enabled.
Set delta calculation to None, and it will work.
Yikes I feel embarrassed now :-[ :-[ :-[ :-[ :-[ :-[ :-[ :-[
Setting the delta calculation to zero sorted it right out.
I'll have to re-read the wiki again to make sure I'm understanding it right.
Thanks tomaskir and Alex for the quick help.