NetXMS Support Forum

English Support => Feature Requests => Topic started by: ntnam on September 24, 2019, 05:09:14 AM

Title: Return threshold value and actual value in Threshold script
Post by: ntnam on September 24, 2019, 05:09:14 AM
I create Data Collection Configuration with threshold value is not fixed

Transformation:
return 10*log10($1/1000);
Script:
transport = CreateSNMPTransport($node);
value = SNMPGetValue(transport, ".1.3.6.1.4.1.9.9.91.1.2.1.1.4." . $dci->instanceData . ".1");
threshold = 10*log10($value/1000);
return (threshold > $1);


I think it's better when i can return threshold value and actual value to the Event Message:
return %(threshold > $1, format(threshold,1,2), format($1,1,2));