<?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[Event Processing Policy Filtering Script]]></title><description><![CDATA[<p dir="auto">I am using NetXMS 3.4.</p>
<p dir="auto">All nodes have all filesystems discovered with instance discovery.  However, I only want and email alert if C:\ free space reaches a threshold.</p>
<p dir="auto">I thought creating a Filtering Script in the EPP would be the way to do this, but I continue to get alerts for ALL filesystems.</p>
<p dir="auto">Here is my script:</p>
<pre><code>if (%6 ilike "C:\\") {
	return true;
}
return false;
</code></pre>
<p dir="auto">I've also tried variations like below but they don't work either.</p>
<pre><code>if (%6 ilike "*C:\\*") {
or
if (%1 ilike "*C:\\*") {
</code></pre>
<p dir="auto">Here is the body of an email alert I receive for D:\, which I thought the above script would filter out.  (I have the alert threshold set to 92 for testing, so the events keep getting triggered.)<br />
FQDN: Jacques-PC.odcvu.local<br />
Zone:0<br />
Severity:[3]<br />
Name: JACQUES-PC<br />
Message: D:\ disk low (17.853211% remaining)<br />
1 is FileSystem.FreePerc(D:\)<br />
2 is File system: free space on D:\ (%)<br />
3 is 92<br />
4 is 17.853211<br />
5 is 0x00002688<br />
6 is <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f627.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--anguished" style="height:1.4em;width:auto;vertical-align:middle" title="D:" alt="😧" /><br />
7 is 0<br />
8 is 17.853211<br />
9 is</p>
<p dir="auto">On a related topic, the EPP Filtering Script 'Hint' text reads there is a local variable "EVENT_TEXT" you can use.  One, is that the equivalent of %m?  And two, is the correct syntax for that:</p>
<pre><code>if (EVENT_TEXT like "something") {
or
if ($EVENT_TEXT like "something") {
or
if (%EVENT_TEXT like "something") {
...or something else?
</code></pre>
<p dir="auto">What is wrong with my script?  What should be changed?  Thanks!</p>
]]></description><link>https://forum.netxms.org/topic/6632/event-processing-policy-filtering-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:23:38 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6632.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 04 Aug 2020 01:23:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Event Processing Policy Filtering Script on Wed, 05 Aug 2020 17:02:33 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">they match. If %6 expands to empty string it means that "instance" attributre in DCI is not set. Are those DCIs created by instance discovery or manually? If manually, did you set "instance" field?</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/28362</link><guid isPermaLink="true">https://forum.netxms.org/post/28362</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 05 Aug 2020 17:02:33 GMT</pubDate></item><item><title><![CDATA[Reply to Event Processing Policy Filtering Script on Wed, 05 Aug 2020 00:06:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi Victor. </p>
<p dir="auto">You suggested to use %6, but when I dump the %1...%9 variables in my email message, for troubleshooting, %6 is empty.  Do the %1 variables in filtering scripts not match those used in Actions?</p>
<pre><code>FQDN: Ted-Win10VM.odcvu.local
Zone:0
Severity:[3]
Name: Ted-Win10VM
Message:  disk low (66.925406% remaining)
1 is FileSystem.FreePerc(C:\)
2 is ODC- C:\ free space
3 is 70
4 is 66.925406
5 is 0x0000279F
6 is
7 is 0
8 is 66.925406
9 is
</code></pre>
]]></description><link>https://forum.netxms.org/post/28355</link><guid isPermaLink="true">https://forum.netxms.org/post/28355</guid><dc:creator><![CDATA[tfines]]></dc:creator><pubDate>Wed, 05 Aug 2020 00:06:22 GMT</pubDate></item><item><title><![CDATA[Reply to Event Processing Policy Filtering Script on Tue, 04 Aug 2020 20:58:53 GMT]]></title><description><![CDATA[<p dir="auto">Thank you!</p>
]]></description><link>https://forum.netxms.org/post/28353</link><guid isPermaLink="true">https://forum.netxms.org/post/28353</guid><dc:creator><![CDATA[tfines]]></dc:creator><pubDate>Tue, 04 Aug 2020 20:58:53 GMT</pubDate></item><item><title><![CDATA[Reply to Event Processing Policy Filtering Script on Tue, 04 Aug 2020 07:29:52 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">syntax for accessing event parameters within filter script is different from macro expansion. You can access event object via global variable $event. It has attribute "parameters" which is array of all event parameters. You can either use this attribute or you can use expandString method to expand standard macros. So your filter script could be in one of two forms:</p>
<pre><code>return $event-&gt;parameters[6] ilike "C:\\";
</code></pre>
<p dir="auto">or</p>
<pre><code>return $event-&gt;expandString("%6") ilike "C:\\";
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/28337</link><guid isPermaLink="true">https://forum.netxms.org/post/28337</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 04 Aug 2020 07:29:52 GMT</pubDate></item></channel></rss>