NetXMS Support Forum

English Support => General Support => Topic started by: MitchW on October 31, 2023, 09:02:00 AM

Title: Deactivation Event - After x polls
Post by: MitchW on October 31, 2023, 09:02:00 AM
Hello!

Currently we have a small issue with NetXMS resolving errors if it cannot poll a certain value.

For example: The value should be 0. If the value is 1, a error will be given. But if NetXMS cannot poll the value for 1 poll, the errors resolves.
I tried setting the samples to 3 in the hope that the error would also resolve after 3 tries, but this is not the case.

Activation Event - Will be given after 3 polls
Deactivation Event - Will be given after 1 poll


NetXMS is not able to execute a script because the file is probably open. Then NetXMS will "Resolve" the DCI and after 3 polls it will be activated again.
Is it possible to have the deactivation event also set to like 3 polls so that we don't get any "resolved" notifications if NetXMS is not able to get results from a script?

We are on version 4.1.420 over NetXMS Management Console.


Kind Regards,
Mitch
Title: Re: Deactivation Event - After x polls
Post by: Filipp Sudanov on November 04, 2023, 03:22:28 PM
The logic is that if "Samples" is set to 3, then all last three collected values should be "1" to trigger the threshold. If just one non "1" value comes, this means "last 3 values should be equal to 1" becomes false and it instantly generates threshold recovery event.

You can use script threshold, there you can use https://www.netxms.org/documentation/nxsl-latest/#func-getdcivalues function to get a number of last values and make the decision in the script. Drop a line if you need an example for such script.
Title: Re: Deactivation Event - After x polls
Post by: MitchW on November 06, 2023, 09:57:02 AM
Thank you very much Filipp!
I did not think/know about the different functions which are available for the threshold. 

I should get it to work with the information you gave me :) 

Kind Regards,
Mitch