<?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 Filtering Script]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">The following event is triggered on my Event Log and usually happens when an ADSL Link becomes down. I can see the Ip address become 0.0.0.0/0 : </p>
<pre><code>27.03.2015 16:21:26	NCTSP_FGT_60D	SYS_IF_DELETED	Normal	Interface "VIVO_50MB" deleted (IP Addr: 200.171.186.9/255.255.255.255, IfIndex: 4)
27.03.2015 16:21:26	NCTSP_FGT_60D	SYS_IF_ADDED	Normal	Interface "VIVO_50MB" added (IP Addr: 0.0.0.0/0.0.0.0, IfIndex: 4)
27.03.2015 16:24:19	NCTSP_FGT_60D	SYS_IF_UP	Normal	Interface "VIVO_50MB" changed state to UP (IP Addr: 0.0.0.0/0.0.0.0, IfIndex: 4)
</code></pre>
<p dir="auto">I want to trigger an particular Alarm when it happens, and of corse, automatically end that Alarm when the IP isn't 0.0.0.0/0 anymore. To do that I need to use Filtering Scripts to analyze the "Message" of the Event. I'm also filtering by Event Code but I need help with the Script.</p>
<pre><code>if ($event-&gt;message like “0.0.0.0/0.0.0.0”){
  return true; // Match rule
}
</code></pre>
<p dir="auto">And to end the Event, I'm just denying (!) the script :</p>
<pre><code>if ($event-&gt;message !like “0.0.0.0/0.0.0.0”){
  return true; // Match rule
}
</code></pre>
<p dir="auto">But the filtering seems to not work, every event with any value is triggered.<br />
Can someone help me with this filtering script please  ?</p>
<p dir="auto">Thanks in advance !</p>
]]></description><link>https://forum.netxms.org/topic/3666/event-processing-filtering-script</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 07:31:28 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3666.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Apr 2015 19:07:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Event Processing Filtering Script on Wed, 18 Mar 2020 08:48:57 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">OID of what? Device or specific DCI you are fetching?</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/27579</link><guid isPermaLink="true">https://forum.netxms.org/post/27579</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 18 Mar 2020 08:48:57 GMT</pubDate></item><item><title><![CDATA[Reply to Event Processing Filtering Script on Tue, 17 Mar 2020 03:35:07 GMT]]></title><description><![CDATA[<p dir="auto">Hey all,</p>
<p dir="auto">I'm looking to want to do a EPP filter script based on a OID.</p>
<p dir="auto">So my base OID =  .1.3.6.1.2.1.31.1.1.1.10.XX</p>
<p dir="auto">Where XX &gt;  15000000</p>
<p dir="auto">Any ideas?</p>
<p dir="auto">With thanks</p>
]]></description><link>https://forum.netxms.org/post/27569</link><guid isPermaLink="true">https://forum.netxms.org/post/27569</guid><dc:creator><![CDATA[LogicalNZ]]></dc:creator><pubDate>Tue, 17 Mar 2020 03:35:07 GMT</pubDate></item><item><title><![CDATA[Reply to Event Processing Filtering Script on Tue, 11 Jul 2017 08:45:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tursiops" aria-label="Profile: tursiops">@<bdi>tursiops</bdi></a> said in <a href="/post/22591">Event Processing Filtering Script</a>:</p>
<blockquote>
<p dir="auto">Your example should be ok to exclude anything with "DWL" in it.<br />
...<br />
You can always run this against a node via "Execute server script" to confirm that it returns the result you are expecting.</p>
</blockquote>
<p dir="auto">Thx.<br />
Some changes:</p>
<pre><code>if (($node-&gt;name) like "*DWL*") {
	return false;
} else {
return true;
}
</code></pre>
]]></description><link>https://forum.netxms.org/post/22631</link><guid isPermaLink="true">https://forum.netxms.org/post/22631</guid><dc:creator><![CDATA[VladimirV]]></dc:creator><pubDate>Tue, 11 Jul 2017 08:45:39 GMT</pubDate></item><item><title><![CDATA[Reply to Event Processing Filtering Script on Fri, 07 Jul 2017 12:14:17 GMT]]></title><description><![CDATA[<p dir="auto">Your example should be ok to exclude anything with "DWL" in it.<br />
I have to assume there is a "return true;" somewhere in your script as well? Otherwise the result will be "false" anyway and the exclusion is unnecessary - as the filter will never return true.<br />
For your exclusion, you may also want to make sure that your node name is in fact using capitalised "DWL". If not, maybe use "ilike" instead of "like".</p>
<p dir="auto">This should be enough to exclude anything with "DWL" (capitalised or not) in it and include everything else:</p>
<pre><code>if ($node-&gt;name ilike "*DWL*") return false;
return true;
</code></pre>
<p dir="auto">You can always run this against a node via "Execute server script" to confirm that it returns the result you are expecting.</p>
]]></description><link>https://forum.netxms.org/post/22591</link><guid isPermaLink="true">https://forum.netxms.org/post/22591</guid><dc:creator><![CDATA[Tursiops]]></dc:creator><pubDate>Fri, 07 Jul 2017 12:14:17 GMT</pubDate></item><item><title><![CDATA[Reply to Event Processing Filtering Script on Fri, 07 Jul 2017 08:17:44 GMT]]></title><description><![CDATA[<p dir="auto">Hi there!<br />
Trying exclude nodes containing the name DWL in Event Processing Policy by filtering script:</p>
<pre><code>if (($node-&gt;name) like "*DWL*") {
	return false;
}
</code></pre>
<p dir="auto">but event do nothing with predefined action.<br />
Is it correct script?</p>
]]></description><link>https://forum.netxms.org/post/22588</link><guid isPermaLink="true">https://forum.netxms.org/post/22588</guid><dc:creator><![CDATA[VladimirV]]></dc:creator><pubDate>Fri, 07 Jul 2017 08:17:44 GMT</pubDate></item><item><title><![CDATA[Reply to Event Processing Filtering Script on Wed, 01 Apr 2015 20:43:24 GMT]]></title><description><![CDATA[<p dir="auto">Hi Alex,</p>
<p dir="auto">Thank you very much, that solved the problem. I was so focused on the message that I forgot to think out of the box.<br />
Do you know how can I fix the syntax of the expression analyzing the "message" string of the Event ? That will help me in other cases ...<br />
I'm trying to do like says here : <a href="https://www.netxms.org/forum/configuration/script-some-generic-questions/msg3186/#msg3186" rel="nofollow ugc">https://www.netxms.org/forum/configuration/script-some-generic-questions/msg3186/#msg3186</a></p>
<p dir="auto">Thank you very much again !</p>
]]></description><link>https://forum.netxms.org/post/16254</link><guid isPermaLink="true">https://forum.netxms.org/post/16254</guid><dc:creator><![CDATA[hadesfromhell]]></dc:creator><pubDate>Wed, 01 Apr 2015 20:43:24 GMT</pubDate></item><item><title><![CDATA[Reply to Event Processing Filtering Script on Wed, 01 Apr 2015 19:36:18 GMT]]></title><description><![CDATA[<p dir="auto">Hello.</p>
<p dir="auto">First of all, you don't have to match message for that. SYS_IF_UP (SYS_IF_DOWN is the same) have 5 parameters, and 3rd one is ip address (check description in event editor).</p>
<p dir="auto">So you can change script to</p>
<pre><code>if ($3 == "0.0.0.0") {
  return true;
}
return false;
</code></pre>
<p dir="auto"> or even (if you don't have any other logic in the script) <code>$3 == "0.0.0.0"</code></p>
<p dir="auto">Then opposite script will be</p>
<pre><code>if ($3 != "0.0.0.0") {
  return true;
}
return false;
</code></pre>
<p dir="auto"> or <code>$3 != "0.0.0.0"</code></p>
<p dir="auto">Problem with your original script was invalid syntax, instead of</p>
<pre><code>if ($event-&gt;message !like “0.0.0.0/0.0.0.0”){
  return true; // Match rule
}
</code></pre>
<p dir="auto">if should've been</p>
<pre><code>if (!$event-&gt;message like “0.0.0.0/0.0.0.0”){
  return true; // Match rule
}
</code></pre>
]]></description><link>https://forum.netxms.org/post/16253</link><guid isPermaLink="true">https://forum.netxms.org/post/16253</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Wed, 01 Apr 2015 19:36:18 GMT</pubDate></item></channel></rss>