Hello,
I'm trying to implement service that downloads file from my servers and gives me time of download. I am doing this via ExternalParameter.
Of course if download time is bigger then ExecTimeout in agent config I get an << ERROR >>. I want to change this error value to integer.
For example, if my download time is greater then 45 seconds, then return 60. I've tried to add the following transformation script, but it doesn't work.
Will be grateful for any help.
sub main ()
{
if ($1 < 46)
return $1;
else
return 60;
}
Quote from: rostyslav on December 12, 2012, 11:14:45 AM
Hello,
I'm trying to implement service that downloads file from my servers and gives me time of download. I am doing this via ExternalParameter.
Of course if download time is bigger then ExecTimeout in agent config I get an << ERROR >>. I want to change this error value to integer.
For example, if my download time is greater then 45 seconds, then return 60. I've tried to add the following transformation script, but it doesn't work.
Will be grateful for any help.
sub main ()
{
if ($1 < 46)
return $1;
else
return 60;
}
history for this DCI?
There is no history.
Quote from: rostyslav on December 12, 2012, 12:37:33 PM
There is no history.
collect some raw value (without transformation)
Hi!
Basically, you cannot convert data collection error to value. You only can set threshold on that. For long-running external parameters I would recommend using external parameter provider instead: http://wiki.netxms.org/wiki/ExternalParametersProvider (http://wiki.netxms.org/wiki/ExternalParametersProvider).
Best regards,
Victor