<?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[EPP Script to block OID's from setting alarms - Please Help]]></title><description><![CDATA[<p dir="auto">Hey all,</p>
<p dir="auto">I'm a little lost, I need to write e EPP script to filter an OID Address.</p>
<p dir="auto">The address range I want to filter is:</p>
<p dir="auto">.1.3.6.1.2.1.31.1.1.1.6.[filter &lt; 1000] and .1.3.6.1.2.1.31.1.1.1.10.[filter &lt; 1000]</p>
<p dir="auto">Can anyone help me with this please?</p>
<p dir="auto">With thanks</p>
<p dir="auto">Alan Scott</p>
]]></description><link>https://forum.netxms.org/topic/6477/epp-script-to-block-oid-s-from-setting-alarms-please-help</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 09:34:56 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/6477.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 31 Mar 2020 05:56:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to EPP Script to block OID's from setting alarms - Please Help on Thu, 02 Apr 2020 12:32:08 GMT]]></title><description><![CDATA[<p dir="auto">It depends on what you want to achieve.</p>
<p dir="auto">If you are not interested in these interfaces at all, you can prevent them from creating - modify script "Hook::CreateInterface" in scripting library. Script is executed on configuration poll for each new interface (accessible as $1, <a href="https://www.netxms.org/documentation/nxsl-latest/#class-interface" rel="nofollow ugc">https://www.netxms.org/documentation/nxsl-latest/#class-interface</a>) and should return true or false. If return value is false - interface will not be created.</p>
<p dir="auto">It's possible to use $1-&gt;ifType (interface type as defined by IANA, list of interface types available here: <a href="https://github.com/netxms/netxms/blob/master/include/nms_common.h#L908" rel="nofollow ugc">https://github.com/netxms/netxms/blob/master/include/nms_common.h#L908</a>, or can be seen on the object overview tab when interface is selected).<br />
Or you can query node via SNMP to get some data.</p>
<p dir="auto">If you want to keep interfaces in the system, but ignore status change - simplest way is to set “Expected Interface State” to IGNORE. You can do it in configuration poll hook (Hook::ConfigurationPoll).<br />
Sample:</p>
<p dir="auto">for (i : $node-&gt;interfaces) {<br />
    if (i-&gt;ifType == 131) { // tunnel<br />
        i-&gt;setExpectedState("IGNORE");<br />
    }<br />
}</p>
<p dir="auto">If you want to block events in the EPP, add rule before any alarms or notifications:<br />
Script:<br />
    i = $node-&gt;getInterface($5);<br />
    if (i-&gt;ifType == 131) { // or any other filter<br />
        return true;<br />
    }<br />
    return false;<br />
Action:<br />
    stop processing</p>
<p dir="auto">Alternatively, add script to your alarm / notification rules and return true only if it’s not dynamic interface:<br />
    i = $node-&gt;getInterface($5);<br />
    if (i-&gt;ifType == 131) { // or any other filter<br />
        return true;<br />
    }<br />
    return false;</p>
]]></description><link>https://forum.netxms.org/post/27697</link><guid isPermaLink="true">https://forum.netxms.org/post/27697</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Thu, 02 Apr 2020 12:32:08 GMT</pubDate></item><item><title><![CDATA[Reply to EPP Script to block OID's from setting alarms - Please Help on Wed, 01 Apr 2020 16:25:19 GMT]]></title><description><![CDATA[<p dir="auto">So the issue I have is when a user connects to a vpn these interfaces are created and then the monitoring starts, which is fine.</p>
<p dir="auto">The issue is that when the user disconnects from the vpn these interfaces become in a unknown start until they drop off. Thats fine as well, but when they move into the unknown state they produce an alarm (thats what I want to stop happening).</p>
<p dir="auto">One of the options I have have put to me is to stop monitoring tunnel interfaces in the EPP all together, the issue with this approach is that I have a number of tunnel interfaces that I do want to monitor, its just the dynamic tunnel interfaces that I don't want to monitor.</p>
<p dir="auto">The dynamic interfaces are identified by the following OID's</p>
<p dir="auto"> .1.3.6.1.2.1.31.1.1.1.6.[greater than 1000] and .1.3.6.1.2.1.31.1.1.1.10.[greater than 1000]</p>
<p dir="auto">So my thought to to create some type of script to look for these OID's and tell netXMS not to alert on the interface going to a unknown state.</p>
<p dir="auto">I hope that makes it clearer <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>
<p dir="auto">With thanks</p>
]]></description><link>https://forum.netxms.org/post/27692</link><guid isPermaLink="true">https://forum.netxms.org/post/27692</guid><dc:creator><![CDATA[LogicalNZ]]></dc:creator><pubDate>Wed, 01 Apr 2020 16:25:19 GMT</pubDate></item><item><title><![CDATA[Reply to EPP Script to block OID's from setting alarms - Please Help on Tue, 31 Mar 2020 08:51:11 GMT]]></title><description><![CDATA[<p dir="auto">Can you give more details on what are you trying to achieve?<br />
Do you have a node which has SNMP data for these OIDs?<br />
Do you have any DCIs on that node?<br />
What result of the filtering do you expect?</p>
]]></description><link>https://forum.netxms.org/post/27676</link><guid isPermaLink="true">https://forum.netxms.org/post/27676</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Tue, 31 Mar 2020 08:51:11 GMT</pubDate></item></channel></rss>