Hi,
I have the following problem. I need to monitor a folder for changes. I do this by using a File.Size DCI and comparing the size of the folder with the previous read size. The DCI runs every hour. If the size is the same, it's a sign that our process has a problem.
My problem now is, that the folder can be empty for long time and this is totally ok. How can I tell a threshold not to fire an alarm if the value is zero?
Regards
Stefan
Assuming the GetDCIValue contains the last value until the collection is complete (need to verify this) then a simple Threshold script like the following should work:
// Empty is OK no matter what
if ($1 == 0) return false;
// Non-empty OK only if different
if ($1 != GetDCIValue($node, $dci->id)) return false;
// Not OK, trigger threshold
return true;
Thank You.