<?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[Using custom attribute in a DCI]]></title><description><![CDATA[<p dir="auto">I am trying to use a custom attribute inside a DCI.  I have a data parameter ServiceCheck.Custom(%IP%,80) and a custom attribute IP = 192.168.0.1.  I am trying to poll the web port of a device from this node, but I want to specify the IP as a custom attribute.  Is this possible? and what is the correct syntax?  Thanks, Andrew</p>
]]></description><link>https://forum.netxms.org/topic/5305/using-custom-attribute-in-a-dci</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 14:04:57 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/5305.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Oct 2017 18:33:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using custom attribute in a DCI on Tue, 14 Nov 2017 17:24:04 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
Please check this forum discussion:<br />
<a href="https://www.netxms.org/forum/general-support/custom-attributes-as-parameters-to-dcis/" rel="nofollow ugc">https://www.netxms.org/forum/general-support/custom-attributes-as-parameters-to-dcis/</a> - described how to get custom attribute as DCI parameter</p>
]]></description><link>https://forum.netxms.org/post/23382</link><guid isPermaLink="true">https://forum.netxms.org/post/23382</guid><dc:creator><![CDATA[zev]]></dc:creator><pubDate>Tue, 14 Nov 2017 17:24:04 GMT</pubDate></item><item><title><![CDATA[Reply to Using custom attribute in a DCI on Thu, 09 Nov 2017 22:57:22 GMT]]></title><description><![CDATA[<p dir="auto">I must be doing something wrong, mu last values are coming back 2, server unreachable.  Here are my custom attributes:<br />
<a href="https://drive.google.com/open?id=1sTdSdAnl19PE1s9tEyblDoFBWsB8pF9M" rel="nofollow ugc">https://drive.google.com/open?id=1sTdSdAnl19PE1s9tEyblDoFBWsB8pF9M</a><br />
and my parameter:<br />
<a href="https://drive.google.com/open?id=1nX1--Or_tzzb6dCwTeKRg5UfoejWbu9e" rel="nofollow ugc">https://drive.google.com/open?id=1nX1--Or_tzzb6dCwTeKRg5UfoejWbu9e</a></p>
<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/23300">Using custom attribute in a DCI</a>:</p>
<blockquote>
<p dir="auto">Macros within parameter name expanded only when you apply template to node. If it is fine, you can use script macro, and read custom attribute in script. But if you want that DCI will use current value of custom attribute immediately after your change it, themn the only option is to switch to script DCI and use AgentReadParameter function. For example:</p>
<pre><code>return AgentReadParameter($node, "ServiceCheck.Custom(" . GetCustomAttribute($node, "IP") . ",80)");
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
</blockquote>
<hr />
<p dir="auto"><img src="/assets/uploads/files/smf/0000000003795-CA.png" alt="CA.png" class="img-markdown  img-fluid" width="625" height="548" /></p>
<p dir="auto"><img src="/assets/uploads/files/smf/0000000003797-Parameters.png" alt="Parameters.png" class="img-markdown  img-fluid" width="656" height="625" /></p>
]]></description><link>https://forum.netxms.org/post/23358</link><guid isPermaLink="true">https://forum.netxms.org/post/23358</guid><dc:creator><![CDATA[Andrew]]></dc:creator><pubDate>Thu, 09 Nov 2017 22:57:22 GMT</pubDate></item><item><title><![CDATA[Reply to Using custom attribute in a DCI on Thu, 02 Nov 2017 08:14:42 GMT]]></title><description><![CDATA[<p dir="auto">Macros within parameter name expanded only when you apply template to node. If it is fine, you can use script macro, and read custom attribute in script. But if you want that DCI will use current value of custom attribute immediately after your change it, themn the only option is to switch to script DCI and use AgentReadParameter function. For example:</p>
<pre><code>return AgentReadParameter($node, "ServiceCheck.Custom(" . GetCustomAttribute($node, "IP") . ",80)");
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/23300</link><guid isPermaLink="true">https://forum.netxms.org/post/23300</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 02 Nov 2017 08:14:42 GMT</pubDate></item></channel></rss>