<?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[Set Interface Expected State by Template?]]></title><description><![CDATA[<p dir="auto">Is there a way to set interface expected state by a template?  We use Unifi APs and these things change their interface state as often as I change my underwear it seems.  I would like to set NetXMS so that if the device is a Unifi AP, then all interfaces are automatically set to Ignore for expected state.</p>
<p dir="auto">I searched the forums and didn't find this situation.  Any help would be much appreciated.</p>
]]></description><link>https://forum.netxms.org/topic/7557/set-interface-expected-state-by-template</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:20:38 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7557.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Nov 2022 17:51:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Set Interface Expected State by Template? on Thu, 10 Nov 2022 12:34:28 GMT]]></title><description><![CDATA[<p dir="auto">Just to note - PollerTrace line is optional - it just produces debug output when configuration poll is executed manually.</p>
]]></description><link>https://forum.netxms.org/post/32020</link><guid isPermaLink="true">https://forum.netxms.org/post/32020</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Thu, 10 Nov 2022 12:34:28 GMT</pubDate></item><item><title><![CDATA[Reply to Set Interface Expected State by Template? on Wed, 09 Nov 2022 17:48:41 GMT]]></title><description><![CDATA[<p dir="auto">Thanks Filipp, this is perfect.  We've been changing the expected state when alarms come up, so most of the existing ones are done.  I just wanted something so that new ones are done automagically.</p>
]]></description><link>https://forum.netxms.org/post/32018</link><guid isPermaLink="true">https://forum.netxms.org/post/32018</guid><dc:creator><![CDATA[Storm-Donovan]]></dc:creator><pubDate>Wed, 09 Nov 2022 17:48:41 GMT</pubDate></item><item><title><![CDATA[Reply to Set Interface Expected State by Template? on Wed, 09 Nov 2022 15:27:11 GMT]]></title><description><![CDATA[<p dir="auto">That's a moment when the scripting kicks in. Simplest is in HOOK::CreateInterface script - it's being called when creating a new interface. E.g. (for Mikrotik, adjust the OID for Unifi AP):</p>
<pre><code>if ($node-&gt;snmpOID == ".1.3.6.1.4.1.14988.1") {
  PollerTrace("  Setting " . $1-&gt;name . " expected state to ignore");
  $1-&gt;setExpectedState("IGNORE");
}
return true;
</code></pre>
<p dir="auto">If you return false from the script, the interface won't be created at all.</p>
<p dir="auto">But for this to work you'd need to delete all interfaces for already created nodes. Alternative approach is to make a script that will loop through all nodes and their interfaces and set expected state - give a note if you need example of such script.</p>
]]></description><link>https://forum.netxms.org/post/32016</link><guid isPermaLink="true">https://forum.netxms.org/post/32016</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Wed, 09 Nov 2022 15:27:11 GMT</pubDate></item></channel></rss>