<?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[Instance Discovery Filter Script [SOLVED]]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">   I am trying to use the function of automate creating DCIs but I have a problem because I cannot properly use calling of scripts or dont know which parameters I can use within the filter (without scripts).</p>
<p dir="auto">What I have:<br />
Nodes with similar OIDs, but the tracked value (CPU usage) has different "last ID". In my case:<br />
.1.3.6.1.4.1.25506.2.6.1.1.1.1.6.47<br />
.1.3.6.1.4.1.25506.2.6.1.1.1.1.6.65 (etc)<br />
All nodes have one common thing - all other values are "0"<br />
So one node has trackable value in 47, all others are "0".</p>
<p dir="auto">What I want to achieve:<br />
Set DCI in template to apply DCIs based on having non-"0" value</p>
<p dir="auto">What I achieved so far:<br />
I set OID with these settings:</p>
<p dir="auto">General<br />
Description: CPU OID:{instance} (to make the DCI show number of the last ID)<br />
Parameter: .1.3.6.1.4.1.25506.2.6.1.1.1.1.6.{instance} (to show scanned OID, I think when using Instance Discovery function this "parameter" could remain empty, it will still work so this is only for informative purpose too)<br />
Origin: SNMP (just to be sure)<br />
Data Type: Integer</p>
<p dir="auto">Instance Discovery<br />
Instance discovery method: SNMP Walk - OIDs<br />
Base SNMP OID: .1.3.6.1.4.1.25506.2.6.1.1.1.1.6<br />
Instance discovery fltering script: ...</p>
<p dir="auto">... and this part is unknown for me.</p>
<p dir="auto">It would be great if I could use some kind of parameter to get the value of the currently SNMPwalked OID so that I can simply write:</p>
<p dir="auto">"walkedValue != 0;" (if the walked value is non-zero, proceed)</p>
<p dir="auto">Or get the currently walked OID so that I can write a script:</p>
<p dir="auto">transport = CreateSNMPTransport(FindObject($node));<br />
varbind = SNMPGet(transport, walkedOID);<br />
if (varbind-&gt;value != 0) return 1;<br />
else return 0;</p>
<p dir="auto">Or save the script to the script library and call it:</p>
<p dir="auto">script:filter</p>
<p dir="auto">To my underrstanding this is limited to name, description, and instance fields of template DCI so a "normal" call of script:</p>
<p dir="auto">filter();</p>
<p dir="auto">But there is still the problem with getting the walkedOID value so I am really at loss how to solve this. It seems there is definitely a way and I am just not being able to see it.</p>
<p dir="auto">Can you please point me the way ?<br />
Thanks in advance.</p>
<p dir="auto">Milan Sperl</p>
]]></description><link>https://forum.netxms.org/topic/2417/instance-discovery-filter-script-solved</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 06:29:26 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2417.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 04 Jun 2013 15:15:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Fri, 30 May 2014 14:09:08 GMT]]></title><description><![CDATA[<p dir="auto">When you remove those DCIs with zero values manually, they pop back up ?<br />
If not, it must have been something while creating the DCI (mind that whenever you open or modify the DCI it reapplies).<br />
If these return after modyfying/opening the root DCI, there is something in it.</p>
]]></description><link>https://forum.netxms.org/post/14022</link><guid isPermaLink="true">https://forum.netxms.org/post/14022</guid><dc:creator><![CDATA[sperlm]]></dc:creator><pubDate>Fri, 30 May 2014 14:09:08 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Thu, 29 May 2014 18:19:54 GMT]]></title><description><![CDATA[<p dir="auto">Yes, for instanced dcis.</p>
<p dir="auto">I have checked history and snmpwalk, these values have never been more than 0, see attachment.</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001763-walk.png" alt="walk.png" class="img-markdown  img-fluid" width="839" height="528" /></p>
]]></description><link>https://forum.netxms.org/post/14015</link><guid isPermaLink="true">https://forum.netxms.org/post/14015</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Thu, 29 May 2014 18:19:54 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Tue, 20 May 2014 10:42:17 GMT]]></title><description><![CDATA[<p dir="auto">The filter discussed above is for the instanced DCIs, right ?<br />
At the time of applying of the DCI it checks if there are values (non-zero and non-null) and creates real DCI for that one OID.</p>
<p dir="auto">Where exactly are you getting those 0 values ?</p>
<p dir="auto">If there are semi-stable values in the OIDs and DCIs are created at that time, these will exist even if OID return 0 afterwards... Check history of the DCIs which are showing 0 now.</p>
<p dir="auto">You can also check snmpwalk if the 0 value is correct or not.</p>
]]></description><link>https://forum.netxms.org/post/13938</link><guid isPermaLink="true">https://forum.netxms.org/post/13938</guid><dc:creator><![CDATA[sperlm]]></dc:creator><pubDate>Tue, 20 May 2014 10:42:17 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Mon, 19 May 2014 12:48:49 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for correcting me!</p>
<p dir="auto">I tried your given script, but still getting 0 values.</p>
<p dir="auto">I guess i'm doing something wrong, or i haven't given all the necessary information.</p>
]]></description><link>https://forum.netxms.org/post/13920</link><guid isPermaLink="true">https://forum.netxms.org/post/13920</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Mon, 19 May 2014 12:48:49 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Wed, 14 May 2014 14:39:53 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Condition (value != null || value != 0) is always true - if value is null then it will not be 0, and vise versa. Correct condition will be (value != null &amp;&amp; value != 0), so full script could look like this:</p>
<pre><code>snmp = CreateSNMPTransport($node);
value = SNMPGetValue(snmp, ".1.3.6.1.2.1.16.1.1.1.3." . $1);
return (value != null) &amp;&amp; (value != 0);
</code></pre>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sperlm" aria-label="Profile: sperlm">@<bdi>sperlm</bdi></a>:</p>
<p dir="auto">you are right, returning 0 is the same as returning false.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13890</link><guid isPermaLink="true">https://forum.netxms.org/post/13890</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 14 May 2014 14:39:53 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Wed, 14 May 2014 08:13:56 GMT]]></title><description><![CDATA[<p dir="auto">Hello, just a question...</p>
<p dir="auto">IF value is 0, doesnt it automatically mean that return value is equivalent to return false ?<br />
(thus not passing the filter script)</p>
<p dir="auto">MS</p>
]]></description><link>https://forum.netxms.org/post/13888</link><guid isPermaLink="true">https://forum.netxms.org/post/13888</guid><dc:creator><![CDATA[sperlm]]></dc:creator><pubDate>Wed, 14 May 2014 08:13:56 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Wed, 14 May 2014 07:43:55 GMT]]></title><description><![CDATA[<p dir="auto">Script looks like this:</p>
<blockquote>
<p dir="auto">snmp = CreateSNMPTransport($node);<br />
value = SNMPGetValue(snmp, ".1.3.6.1.2.1.16.1.1.1.3." . $1);<br />
if (value != null || value != 0) return value;<br />
else return false;</p>
</blockquote>
<p dir="auto">Maybe i just don't get it <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://forum.netxms.org/post/13887</link><guid isPermaLink="true">https://forum.netxms.org/post/13887</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Wed, 14 May 2014 07:43:55 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Mon, 12 May 2014 09:45:12 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">!= null should work. Can you show full script please?</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13874</link><guid isPermaLink="true">https://forum.netxms.org/post/13874</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 12 May 2014 09:45:12 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Mon, 12 May 2014 08:41:55 GMT]]></title><description><![CDATA[<p dir="auto">Victor you are right, i'm receiving null values, so is there a chance to get rid of them too? I tried to add != null, but no success.</p>
]]></description><link>https://forum.netxms.org/post/13872</link><guid isPermaLink="true">https://forum.netxms.org/post/13872</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Mon, 12 May 2014 08:41:55 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Wed, 07 May 2014 15:09:04 GMT]]></title><description><![CDATA[<p dir="auto">Check that you really get the value with SNMPGetValue - it will return null if SNMP query fails for some reason, and null != 0, so instance that cannot be read will be accepted.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/13815</link><guid isPermaLink="true">https://forum.netxms.org/post/13815</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 07 May 2014 15:09:04 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Wed, 07 May 2014 13:45:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/10449">Instance Discovery Filter Script [SOLVED]</a>:</p>
<blockquote>
<p dir="auto">Hi!</p>
<p dir="auto">You actually thinking in right direction - you can use SNMPGet function to read value of each instance and determine to include it or not. Below is a working example of such approach. I use OID .1.3.6.1.2.1.2.2.1.16 (ifOutOctets) as a base. I use</p>
<p dir="auto">Port traffic: {instance}</p>
<p dir="auto">as description and</p>
<p dir="auto">.1.3.6.1.2.1.2.2.1.16.{instance}</p>
<p dir="auto">as parameter name. Correct parameter name is important, because {instance} will be the part after base OID you configure on instance discovery page, not the full OID.</p>
<p dir="auto">Then, on instance discovery page, I set discovery method to "SNMP Walk - OIDs", set base OID to .1.3.6.1.2.1.2.2.1.16, and use the following filtering script:</p>
<p dir="auto">snmp = CreateSNMPTransport($node);<br />
return SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1) != 0;</p>
<p dir="auto">Now just close data collection configuration for the node and run configuration poll. You should get DCIs for all OIDs with non-zero value.</p>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/victor" aria-label="Profile: victor">@<bdi>victor</bdi></a> said in <a href="/post/12112">Instance Discovery Filter Script [SOLVED]</a>:</p>
<blockquote>
<p dir="auto">This filtering script checks that absolute value for given OID is 0. If you have non-zero value which is not changing over time, OID will pass filter but you will still get 0 as delta value.</p>
</blockquote>
<p dir="auto">So I changed from delta value to original value and i'm still getting 0 values. Absolute values all are 0s (checked with snmpwalk).<br />
Where is the problem?<br />
Configuration is the same, except oid is now .1.3.6.1.2.1.31.1.1.1.3. (CRCAlignErrors) where all values are 0:</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/nikk" aria-label="Profile: nikk">@<bdi>nikk</bdi></a> said in <a href="/post/12108">Instance Discovery Filter Script [SOLVED]</a>:</p>
<blockquote>
<p dir="auto">My parameter is:  .1.3.6.1.2.1.31.1.1.1.10.{instance}<br />
and in Instance tab:<br />
SNMP Walk - OID's<br />
 .1.3.6.1.2.1.31.1.1.1.10</p>
<p dir="auto">and script:<br />
snmp = CreateSNMPTransport($node);<br />
return SNMPGetValue(snmp, ".1.3.6.1.2.1.31.1.1.1.10." . $1) != 0;</p>
</blockquote>
]]></description><link>https://forum.netxms.org/post/13813</link><guid isPermaLink="true">https://forum.netxms.org/post/13813</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Wed, 07 May 2014 13:45:55 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Thu, 06 Feb 2014 10:26:02 GMT]]></title><description><![CDATA[<p dir="auto">hi..,</p>
<p dir="auto">i didn't change anything in delta calculation but a little change in this Script.</p>
<p dir="auto">snmp = CreateSNMPTransport($node);<br />
x = SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1);<br />
if  (x != null)  return x;   // you  gave  me like this return (x &gt; 0 );<br />
else return 0;</p>
<p dir="auto">i am also confused how it started collecting data.  due to that change in the script or happened automatically. but still there is 0 value for the other interfaces (10,2.33) strange why it gives for 1,9 did you notice this in screenshots.</p>
<p dir="auto">thank you,<br />
Percy</p>
]]></description><link>https://forum.netxms.org/post/12718</link><guid isPermaLink="true">https://forum.netxms.org/post/12718</guid><dc:creator><![CDATA[Percy]]></dc:creator><pubDate>Thu, 06 Feb 2014 10:26:02 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Thu, 06 Feb 2014 09:48:08 GMT]]></title><description><![CDATA[<p dir="auto">What was the problem if I may ask ?</p>
<p dir="auto">I was also wandering what you mean by the Delta calculation tab, because only delta calculation I am aware of is in the Transformation tab...</p>
]]></description><link>https://forum.netxms.org/post/12716</link><guid isPermaLink="true">https://forum.netxms.org/post/12716</guid><dc:creator><![CDATA[sperlm]]></dc:creator><pubDate>Thu, 06 Feb 2014 09:48:08 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Thu, 06 Feb 2014 09:09:51 GMT]]></title><description><![CDATA[<p dir="auto">hi Sperlm..</p>
<p dir="auto">its working now. thanks a lot for the Support.<br />
posting the Screenshots for the last values.</p>
<p dir="auto">with Regards<br />
Percy</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001594-output3.jpg" alt="output3.jpg" class="img-markdown  img-fluid" width="824" height="512" /></p>
]]></description><link>https://forum.netxms.org/post/12715</link><guid isPermaLink="true">https://forum.netxms.org/post/12715</guid><dc:creator><![CDATA[Percy]]></dc:creator><pubDate>Thu, 06 Feb 2014 09:09:51 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Thu, 06 Feb 2014 08:13:09 GMT]]></title><description><![CDATA[<p dir="auto">hi Milan,</p>
<p dir="auto">thanks for the patience posting you the screenshots for the History of the DCI for the interface 1 and last value.<br />
In Delta calculation tab :- Average Delta Per minute, it is correct or will be something else ?</p>
<p dir="auto">regards.<br />
Percy</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001590-output.jpg" alt="output.jpg" class="img-markdown  img-fluid" width="640" height="695" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001592-output2.jpg" alt="output2.jpg" class="img-markdown  img-fluid" width="797" height="512" /></p>
]]></description><link>https://forum.netxms.org/post/12713</link><guid isPermaLink="true">https://forum.netxms.org/post/12713</guid><dc:creator><![CDATA[Percy]]></dc:creator><pubDate>Thu, 06 Feb 2014 08:13:09 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Thu, 06 Feb 2014 07:58:01 GMT]]></title><description><![CDATA[<p dir="auto">Can you post screenshots with the Last values (for the node) view and History (for one DCI) too ?</p>
]]></description><link>https://forum.netxms.org/post/12712</link><guid isPermaLink="true">https://forum.netxms.org/post/12712</guid><dc:creator><![CDATA[sperlm]]></dc:creator><pubDate>Thu, 06 Feb 2014 07:58:01 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Thu, 06 Feb 2014 07:48:47 GMT]]></title><description><![CDATA[<p dir="auto">hi,</p>
<p dir="auto">yes i checked there are values . i have attached the screen shot.</p>
<p dir="auto">thanks,<br />
Percy</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001588-output.jpg" alt="output.jpg" class="img-markdown  img-fluid" width="640" height="512" /></p>
]]></description><link>https://forum.netxms.org/post/12710</link><guid isPermaLink="true">https://forum.netxms.org/post/12710</guid><dc:creator><![CDATA[Percy]]></dc:creator><pubDate>Thu, 06 Feb 2014 07:48:47 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Thu, 06 Feb 2014 07:38:55 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">do a snmpwalk on the device with .1.3.6.1.2.1.2.2.1.16 value.<br />
It should list all subsequent oids (.1.3.6.1.2.1.2.2.1.16.0, .1.3.6.1.2.1.2.2.1.16.1 etc..) with values and see if there are values in 1, 2, 9, 10, 33.</p>
<p dir="auto">One more thing - Instance discovery method should be SNMP Walk - OIDs (but I suppose you've got that right).</p>
<p dir="auto">With regards,<br />
Milan</p>
]]></description><link>https://forum.netxms.org/post/12709</link><guid isPermaLink="true">https://forum.netxms.org/post/12709</guid><dc:creator><![CDATA[sperlm]]></dc:creator><pubDate>Thu, 06 Feb 2014 07:38:55 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Thu, 06 Feb 2014 06:06:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sperlm" aria-label="Profile: sperlm">@<bdi>sperlm</bdi></a> said in <a href="/post/12690">Instance Discovery Filter Script [SOLVED]</a>:</p>
<blockquote>
<p dir="auto">Hello, I will reply here so others can try to help too.</p>
<blockquote>
<p dir="auto">DESCRIPTION -interface traffic: {instance}<br />
PARAMETER -1.3.6.1.2.1.2.2.1.16.{instance}<br />
base OID to .1.3.6.1.2.1.2.2.1.16<br />
snmp = CreateSNMPTransport($node);<br />
return SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1) != 0;</p>
</blockquote>
<p dir="auto">Not sure if it is the problem you encountered but I had problems with this structure because there is no guarantee there will be 0 value, there can be null too so I wrote it like this:</p>
<p dir="auto">snmp = CreateSNMPTransport($node);<br />
x = SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1);<br />
if  (x != null) return (x &gt; 0);<br />
else return 0;</p>
<p dir="auto">p.s. does it mean you get the desired DCI with correct OID on all of your nodes but the value there is 0 or it creates unwanted DCIs with wrong OID?</p>
</blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/percy" aria-label="Profile: percy">@<bdi>percy</bdi></a> said in <a href="/post/12704">Instance Discovery Filter Script [SOLVED]</a>:</p>
<blockquote>
<p dir="auto">hi Sperlm,</p>
<p dir="auto">thank you for replying back.</p>
</blockquote>
<p dir="auto">Not sure if it is the problem you encountered but I had problems with this structure because there is no guarantee there will be 0 value, there can be null too so I wrote it like this:</p>
<p dir="auto">snmp = CreateSNMPTransport($node);<br />
x = SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1);<br />
if  (x != null) return (x &gt; 0);<br />
else return 0;<br />
[/quote]<br />
i tried this Script on the instance discovery tab of Template than applied to Node i get the DCI for Non Zero values interfaces [ like 1,2,9,10,33] pls check on attachment but when i see the collected values for these DCI it shows 0 value...</p>
<p dir="auto">[/quote]</p>
<p dir="auto">p.s. does it mean you get the desired DCI with correct OID on all of your nodes but the value there is 0 or it creates unwanted DCIs with wrong OID?<br />
[/quote]<br />
yes getting 0 value. why it does not give the values of traffic on interfaces.<br />
[/quote]</p>
]]></description><link>https://forum.netxms.org/post/12705</link><guid isPermaLink="true">https://forum.netxms.org/post/12705</guid><dc:creator><![CDATA[Percy]]></dc:creator><pubDate>Thu, 06 Feb 2014 06:06:05 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Thu, 06 Feb 2014 06:08:02 GMT]]></title><description><![CDATA[<p dir="auto">hi Sperlm,</p>
<p dir="auto">thank you for replying back.<br />
[/quote]Not sure if it is the problem you encountered but I had problems with this structure because there is no guarantee there will be 0 value, there can be null too so I wrote it like this:</p>
<p dir="auto">snmp = CreateSNMPTransport($node);<br />
x = SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1);<br />
if  (x != null) return (x &gt; 0);<br />
else return 0;[/quote]</p>
<p dir="auto">i tried this Script on the instance discovery tab of Template than applied to Node i get the DCI for Non Zero values interfaces [ like 1,2,9,10,33] pls check on attachment but when i see the collected values for these DCI it shows 0 value...</p>
<p dir="auto">[/quote]p.s. does it mean you get the desired DCI with correct OID on all of your nodes but the value there is 0 or it creates unwanted DCIs with wrong OID?<br />
[/quote]</p>
<p dir="auto">yes getting 0 value. why it does not give the values of traffic on interfaces.<br />
Regards,<br />
Percy</p>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000001586-output.jpg" alt="output.jpg" class="img-markdown  img-fluid" width="932" height="512" /></p>
]]></description><link>https://forum.netxms.org/post/12704</link><guid isPermaLink="true">https://forum.netxms.org/post/12704</guid><dc:creator><![CDATA[Percy]]></dc:creator><pubDate>Thu, 06 Feb 2014 06:08:02 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Wed, 05 Feb 2014 11:33:15 GMT]]></title><description><![CDATA[<p dir="auto">Hello, I will reply here so others can try to help too.</p>
<blockquote>
<p dir="auto">DESCRIPTION -interface traffic: {instance}<br />
PARAMETER -1.3.6.1.2.1.2.2.1.16.{instance}<br />
base OID to .1.3.6.1.2.1.2.2.1.16<br />
snmp = CreateSNMPTransport($node);<br />
return SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1) != 0;</p>
</blockquote>
<p dir="auto">Not sure if it is the problem you encountered but I had problems with this structure because there is no guarantee there will be 0 value, there can be null too so I wrote it like this:</p>
<p dir="auto">snmp = CreateSNMPTransport($node);<br />
x = SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1);<br />
if  (x != null) return (x &gt; 0);<br />
else return 0;</p>
<p dir="auto">p.s. does it mean you get the desired DCI with correct OID on all of your nodes but the value there is 0 or it creates unwanted DCIs with wrong OID?</p>
]]></description><link>https://forum.netxms.org/post/12690</link><guid isPermaLink="true">https://forum.netxms.org/post/12690</guid><dc:creator><![CDATA[sperlm]]></dc:creator><pubDate>Wed, 05 Feb 2014 11:33:15 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Wed, 05 Feb 2014 10:35:31 GMT]]></title><description><![CDATA[<p dir="auto">hi,<br />
I tried your script from that i am able to get non zero interfaces but still there is a problem why it is giving 0 value of traffic on interfaces.<br />
regards<br />
Percy</p>
]]></description><link>https://forum.netxms.org/post/12684</link><guid isPermaLink="true">https://forum.netxms.org/post/12684</guid><dc:creator><![CDATA[Percy]]></dc:creator><pubDate>Wed, 05 Feb 2014 10:35:31 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Mon, 09 Dec 2013 07:37:28 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Yea, I thought that it could be something with non-zero values, but some of them actually are 0 values, as some ports, have never been opened.<br />
I'm monitoring many parameters on a lot of instances, so maybe I just delete the unnecessary instances for now <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /><br />
Thank you for idea any way <img src="https://forum.netxms.org/assets/plugins/nodebb-plugin-emoji/emoji/android/1f609.png?v=72b86a538fc" class="not-responsive emoji emoji-android emoji--wink" style="height:1.4em;width:auto;vertical-align:middle" title=";)" alt="😉" /></p>
<p dir="auto">Nikk</p>
]]></description><link>https://forum.netxms.org/post/12120</link><guid isPermaLink="true">https://forum.netxms.org/post/12120</guid><dc:creator><![CDATA[Nikk]]></dc:creator><pubDate>Mon, 09 Dec 2013 07:37:28 GMT</pubDate></item><item><title><![CDATA[Reply to Instance Discovery Filter Script [SOLVED] on Sat, 07 Dec 2013 09:39:11 GMT]]></title><description><![CDATA[<p dir="auto">This filtering script checks that absolute value for given OID is 0. If you have non-zero value which is not changing over time, OID will pass filter but you will still get 0 as delta value. If you want to filter out any non-changing values, you should get two samples and check delta, like this:</p>
<pre><code>snmp = CreateSNMPTransport($node);
v1 = SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1);
sleep(10000);  // sleep for 10 seconds
v2 = SNMPGetValue(snmp, ".1.3.6.1.2.1.2.2.1.16." . $1);
return (v2 - v1) != 0;
</code></pre>
<p dir="auto">Of course, practical use of such method is questionable and depends on your goals - you will either miss slowly changing OIDs if sleep interval is too small or make configuration polling extremely long if you have lot of instances and long sleep interval.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/12112</link><guid isPermaLink="true">https://forum.netxms.org/post/12112</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Sat, 07 Dec 2013 09:39:11 GMT</pubDate></item></channel></rss>