<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Threshold with if clause?]]></title><description><![CDATA[<p dir="auto">Hi,<br />
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.<br />
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?</p>
<p dir="auto">Regards</p>
<p dir="auto">Stefan</p>
]]></description><link>https://forum.netxms.org/topic/7334/threshold-with-if-clause</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 16:29:24 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7334.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Mar 2022 08:38:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Threshold with if clause? on Mon, 28 Mar 2022 08:35:11 GMT]]></title><description><![CDATA[<p dir="auto">Thank You.</p>
]]></description><link>https://forum.netxms.org/post/31167</link><guid isPermaLink="true">https://forum.netxms.org/post/31167</guid><dc:creator><![CDATA[stoffmann]]></dc:creator><pubDate>Mon, 28 Mar 2022 08:35:11 GMT</pubDate></item><item><title><![CDATA[Reply to Threshold with if clause? on Thu, 24 Mar 2022 11:53:43 GMT]]></title><description><![CDATA[<p dir="auto">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:</p>
<pre><code>// Empty is OK no matter what
if ($1 == 0) return false;

// Non-empty OK only if different
if ($1 != GetDCIValue($node, $dci-&gt;id)) return false;

// Not OK, trigger threshold
return true;
</code></pre>
]]></description><link>https://forum.netxms.org/post/31161</link><guid isPermaLink="true">https://forum.netxms.org/post/31161</guid><dc:creator><![CDATA[lweidig]]></dc:creator><pubDate>Thu, 24 Mar 2022 11:53:43 GMT</pubDate></item></channel></rss>