<?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[Filtering Script on Event Processing Policy request value from other dci]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I have a Event Processing Policy which send me an Alarm If a Networkinterface has more than 5 Errors / min. <br />
Now I want to filter that a Alarm is only generated when the Interface is not on halfduplex mode.</p>
<p dir="auto">For both I have set a DCI.</p>
<p dir="auto">Unfortunally I have no Idea how I can match the other DCI in the Filterscript...</p>
<p dir="auto">Some Ideas?</p>
<p dir="auto">Thanks a lot.</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000006520-DCI.jpg" alt="DCI.jpg" class="img-markdown  img-fluid" width="1393" height="330" /></p>
]]></description><link>https://forum.netxms.org/topic/7781/filtering-script-on-event-processing-policy-request-value-from-other-dci</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 07:26:56 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7781.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 05 Oct 2023 12:31:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Filtering Script on Event Processing Policy request value from other dci on Thu, 01 Feb 2024 15:06:06 GMT]]></title><description><![CDATA[<p dir="auto">Looks like some screenshots are missing.<br />
But a question regarding your text - may be you can just use your threshold script right on "Port Speed auf x/x/x" DCI?</p>
]]></description><link>https://forum.netxms.org/post/33173</link><guid isPermaLink="true">https://forum.netxms.org/post/33173</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Thu, 01 Feb 2024 15:06:06 GMT</pubDate></item><item><title><![CDATA[Reply to Filtering Script on Event Processing Policy request value from other dci on Wed, 31 Jan 2024 07:23:10 GMT]]></title><description><![CDATA[<p dir="auto">Hi Filipp.</p>
<p dir="auto">thanks for your reply.</p>
<p dir="auto">$1 is current DCI value - this is matched to the "Eingehende Fehlerrate" DCI - but I need the value from the "Port Speed auf x/x/x"<br />
So I can´t use $1 in this script.</p>
<p dir="auto">DCI Template:<br />
<img alt="" class="img-markdown  img-fluid" /><br />
<img alt="" class="img-markdown  img-fluid" /></p>
<p dir="auto">Data Collection in Node:<br />
<img alt="" class="img-markdown  img-fluid" /><br />
<img alt="" class="img-markdown  img-fluid" /></p>
<p dir="auto">right?</p>
]]></description><link>https://forum.netxms.org/post/33165</link><guid isPermaLink="true">https://forum.netxms.org/post/33165</guid><dc:creator><![CDATA[Sash]]></dc:creator><pubDate>Wed, 31 Jan 2024 07:23:10 GMT</pubDate></item><item><title><![CDATA[Reply to Filtering Script on Event Processing Policy request value from other dci on Thu, 18 Jan 2024 05:26:02 GMT]]></title><description><![CDATA[<p dir="auto">Yes, threshold script is a better place for this.</p>
<p dir="auto">If you open hint in editor of threshold script, you'll see:<br />
$1 current DCI value;<br />
$2 threshold value;<br />
$dci this DCI object;<br />
$isCluster true if DCI is on cluster;<br />
$node current node object (null if DCI is not on the node);<br />
$object current object.</p>
<p dir="auto">So you can use $1 instead of GetDCIValueByDescription($node, dciDescription);, this would give you current value of the DCI.</p>
<p dir="auto">GetDCIValueByDescription() actually gets previously collected value, when server starts, values for frequently collected DCIs are not cached from database to memory, that's would explain script error.</p>
]]></description><link>https://forum.netxms.org/post/33130</link><guid isPermaLink="true">https://forum.netxms.org/post/33130</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Thu, 18 Jan 2024 05:26:02 GMT</pubDate></item><item><title><![CDATA[Reply to Filtering Script on Event Processing Policy request value from other dci on Wed, 17 Jan 2024 10:25:34 GMT]]></title><description><![CDATA[<p dir="auto">Hi Filipp,</p>
<p dir="auto">sorry for the late response. Thanks for the example.</p>
<p dir="auto">I use it now in Threshold Script.<br />
The Script</p>
<p dir="auto">1 dciDescription = "Port Speed auf 1/1/3";<br />
2 portSpeed = GetDCIValueByDescription($node, dciDescription);<br />
3<br />
4 if (portSpeed-&gt;contains("HD")) return true;<br />
5<br />
6 return false;</p>
<p dir="auto">is working - but everytime I restart the NetXMS Server I get an Error about the Script:</p>
<p dir="auto">Script (DCI::xxx - xxx::10165::12568::ThresholdScript) execution error: Error 14 in line 4: Function or operation argument is not an object</p>
<p dir="auto">Where´s my Misstake?</p>
<p dir="auto">Thanks for your Help.</p>
]]></description><link>https://forum.netxms.org/post/33129</link><guid isPermaLink="true">https://forum.netxms.org/post/33129</guid><dc:creator><![CDATA[Sash]]></dc:creator><pubDate>Wed, 17 Jan 2024 10:25:34 GMT</pubDate></item><item><title><![CDATA[Reply to Filtering Script on Event Processing Policy request value from other dci on Mon, 09 Oct 2023 08:38:03 GMT]]></title><description><![CDATA[<p dir="auto">In event processing policy you can use a filter script like this:</p>
<pre><code>ifName = $dci-&gt;instance;
if (ifName == null or ifName == "") return false;

dciDescription = "Port Speed auf " . ifName;
portSpeed = GetDCIValueByDescription($node, dciDescription);

if (portSpeed-&gt;contains("HD")) return false;

return true;
</code></pre>
<p dir="auto">$dci-&gt;instance will work if your DCIs are created by instance discovery, otherwise you might need to get the interface name by parsing description.</p>
<p dir="auto">Alternative approach could be to use script threshold on your network error DCIs - that script could also get value of port speed DCI and generate threshold violation event only when both conditions are met. This way you would have less events (which also consume resources as they are stored in the DB).</p>
<p dir="auto">Feel free to ask if you need more script examples.</p>
]]></description><link>https://forum.netxms.org/post/32872</link><guid isPermaLink="true">https://forum.netxms.org/post/32872</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Mon, 09 Oct 2023 08:38:03 GMT</pubDate></item></channel></rss>