NetXMS Support Forum

English Support => General Support => Topic started by: LogicalNZ on February 24, 2020, 03:37:02 PM

Title: DCI Table trasform Script help please
Post by: LogicalNZ on February 24, 2020, 03:37:02 PM
Hey all,

I'm trying to get a transform script working on my interface table (I'm not very good at scripting).

This is what I have at the moment:

idxbin = $1->getColumnIndex("bytes-in");
idxbout = $1->getColumnIndex("bytes-out");

for (i=0;i<rowCount;i++)
{
  $1->set(i,idxbin,$1->get(i,idxbin * 8);
  $1->set(i,idxbout,$1->get(i,idxbout * 8);
}



My columns are "bytes-in" and "bytes-out" and are in octets. Is this correct and also how do I set the transform script to be Delta per second?

A little lost and any help would be gratefully accepted...

How do I get rid of them god dam stupid faces!!!


Title: Re: DCI Table trasform Script help please
Post by: Filipp Sudanov on February 25, 2020, 05:41:25 PM
What kind of interface table do you mean? Is it a metric of netxms agent or from some SNMP device, or your custom external table? Can you show how data in that table look like?
What result do you want to get?
Title: Re: DCI Table trasform Script help please
Post by: LogicalNZ on February 26, 2020, 03:26:35 PM
What I'm after is to change the output from these two columns to be the result * 8 and Average delta per second.

This transform only to effect "bytes-in" and "bytes-out" columns in the table.