NetXMS Support Forum

English Support => General Support => Topic started by: aalexson on January 22, 2017, 05:35:54 PM

Title: Removing of bad DCI data
Post by: aalexson on January 22, 2017, 05:35:54 PM
When setting up different nodes for capturing data (Raspberry Pi and temperature probes), at times when pulling for data when rewiring the Raspberry Pi (adding another temp sensor), the returned value is 99.0. 

How does one remove some bad data?

Thank you.
Title: Re: Removing of bad DCI data
Post by: Tursiops on January 24, 2017, 05:01:01 AM
I'd use a transformation script to filter out the known bad values.

Something like
if ($1 == 99.0) return null;
else return $1;


The above would replace the 99.0 with null. Technically still "bad data" and I admit I did not test using null (I tend to set "0" or some descriptive error, depending on what I'm collecting).

To remove data already collected, you either have to either clear the collected data (which will wipe your good data along with it) or go into your database, locate the bad values and remove them.

Hope this helps.
Title: Re: Removing of bad DCI data
Post by: tomaskir on January 24, 2017, 01:00:51 PM
Returning 'null' from data collection will cause a data collection error.
The DCI will have '<<ERROR>>' value in 'Last Values', and nothing will be written to the DB.