<?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[Custom Attributes]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I'm creating templates for switch management. We have both Cisco and HP switches.<br />
To handle this, I'm creating templates per Makers and template to handle DCI and other things.</p>
<p dir="auto">Do you know if it is wise to use Custom Attributes to store specific OIDs ?</p>
<p dir="auto">Is it possible to retrieve Custom Attribute values directly from SNMP DCI page ? or do I need to code transformation script for an internal dummy DCI ?</p>
<p dir="auto">If a custom attribute is declared twice (ie : one on 2 templates attached to one node), is it possible to know which one will be used ?</p>
]]></description><link>https://forum.netxms.org/topic/2446/custom-attributes</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 11:40:56 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/2446.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 18 Jun 2013 13:20:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Custom Attributes on Wed, 19 Jun 2013 09:40:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">You can create new empty template, open data collection configuration for existing one, select DCIs you want to copy to new template, right-click, select "Copy to other node...", and select new template object as destination.</p>
<p dir="auto">You can modify templates using nxshell and Python scripts. Info about nxshell can be found here: <a href="http://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations" rel="nofollow ugc">http://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations</a>, and Java API documentation is here: <a href="https://www.netxms.org/documentation/javadoc/latest/" rel="nofollow ugc">https://www.netxms.org/documentation/javadoc/latest/</a> (you call Java API from nxshell script).</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/10589</link><guid isPermaLink="true">https://forum.netxms.org/post/10589</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Wed, 19 Jun 2013 09:40:16 GMT</pubDate></item><item><title><![CDATA[Reply to Custom Attributes on Wed, 19 Jun 2013 07:59:56 GMT]]></title><description><![CDATA[<p dir="auto">ok,</p>
<p dir="auto">I've recreate specific template per maker. What is the best way to duplicate a template ? Is it clever to export / do modification or merge modification /re-import ?</p>
<p dir="auto">Is there some info on how we can modify templates by scripts ?</p>
]]></description><link>https://forum.netxms.org/post/10588</link><guid isPermaLink="true">https://forum.netxms.org/post/10588</guid><dc:creator><![CDATA[touton]]></dc:creator><pubDate>Wed, 19 Jun 2013 07:59:56 GMT</pubDate></item><item><title><![CDATA[Reply to Custom Attributes on Tue, 18 Jun 2013 14:13:26 GMT]]></title><description><![CDATA[<p dir="auto">Another possible option is to use script type macros in templates. For example, you can use macro like</p>
<p dir="auto">%{script:SelectOID}</p>
<p dir="auto">instead of actual OID in template, and create script called [n]SelectOID[/b] in script library, which will return correct OID for given node. This script will have $node variable set, so it can get any information about the node.</p>
<p dir="auto">For example:</p>
<pre><code>if ($node-&gt;snmpOID like ".1.3.6.1.4.1.11.*")
   return ".1.3.6.1.4.1.11.2.3.4.5.6.7.8.0";
return return ".1.3.6.1.2.1.1.1.0";
</code></pre>
<p dir="auto">Not sure if this will be easier then configuring separate templates...</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/10580</link><guid isPermaLink="true">https://forum.netxms.org/post/10580</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 18 Jun 2013 14:13:26 GMT</pubDate></item><item><title><![CDATA[Reply to Custom Attributes on Tue, 18 Jun 2013 14:03:41 GMT]]></title><description><![CDATA[<p dir="auto">As I'm creating lots of settings (thresholds,...) I was hopping to be able to create template that can work with any devices, and move vendor specifics to another place.</p>
<p dir="auto">what is the best to do this ?</p>
<p dir="auto">Last solution may be to export one template,  modify the xml, and then re-import ? (not really clean, and don't know how the object IDs will match ?)</p>
]]></description><link>https://forum.netxms.org/post/10579</link><guid isPermaLink="true">https://forum.netxms.org/post/10579</guid><dc:creator><![CDATA[touton]]></dc:creator><pubDate>Tue, 18 Jun 2013 14:03:41 GMT</pubDate></item><item><title><![CDATA[Reply to Custom Attributes on Tue, 18 Jun 2013 13:59:52 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Custom attributes are attached to the object. Template only handles data collection configuration, custom attributes will not be copied. Custom attributes was designed to store object-specific attributes, and often used by integration tools or scripts. For data collection it is usually enough to create different templates for different vendors/models.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/10578</link><guid isPermaLink="true">https://forum.netxms.org/post/10578</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Tue, 18 Jun 2013 13:59:52 GMT</pubDate></item><item><title><![CDATA[Reply to Custom Attributes on Tue, 18 Jun 2013 13:53:17 GMT]]></title><description><![CDATA[<p dir="auto">argrr...</p>
<p dir="auto">Custom Attributes created in a template are not "visible" from script created in another one.</p>
<p dir="auto">I've create a CA in HP template MaxMemoryOID = .1.3.6.1.4.1.11.2.14.11.5.1.1.2.1.1.1.5.1<br />
I've bind a HP switch to this template.</p>
<p dir="auto">And in a generic Switch template, I've create a dummy DCI to get SNMP value :</p>
<pre><code>sub main()
{
	trace(1,"Get CA=" . GetCustomAttribute($node, "MaxMemoryOID"));
	snmp = CreateSNMPTransport($node);
	return SNMPGetValue(snmp, GetCustomAttribute($node, "MaxMemoryOID"));
}
</code></pre>
<p dir="auto">If CA is manually defined in the node : it works, if it is inheritated from first template : value is NULL.</p>
<p dir="auto">Any idea to overcome this ?</p>
]]></description><link>https://forum.netxms.org/post/10577</link><guid isPermaLink="true">https://forum.netxms.org/post/10577</guid><dc:creator><![CDATA[touton]]></dc:creator><pubDate>Tue, 18 Jun 2013 13:53:17 GMT</pubDate></item></channel></rss>