Simple Data Transformation Question
-
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.0I 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_pointAs 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/10will work as well (note missing ";" in the end, that's on purpose)
-
@tomaskir said in Simple Data Transformation Question:
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_pointAs 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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login