<?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 value of other DCI in description]]></title><description><![CDATA[<p dir="auto">I want to create event with message that includes node's used physical memory, and also includes total physical memory. can you help me please?</p>
]]></description><link>https://forum.netxms.org/topic/3641/using-value-of-other-dci-in-description</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 20:44:58 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/3641.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 18 Mar 2015 11:12:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to using value of other DCI in description on Thu, 19 Mar 2015 12:21:13 GMT]]></title><description><![CDATA[<p dir="auto">Hello.</p>
<p dir="auto">It depends on what you want to achieve.<br />
If you need that for notifications – you can use custom script to format message("%[ScriptName]" macro). Example:<br />
<img src="https://www.dropbox.com/s/1fd9axi6j1f8fwt/Screenshot%202015-03-19%2014.07.12.png?dl=1" alt="" class="img-markdown  img-fluid" /></p>
<p dir="auto">And script ("CustomScript" in script library):</p>
<pre><code>if ($event-&gt;id == 17) { // SYS_THRESHOLD_REACHED, adjust to real event
	if ($event-&gt;parameters[1] == "System.Memory.Physical.Used") { // $1 is "Parameter name" for SYS_THRESHOLD_REACHED
		total = GetDCIValueByName($node, "System.Memory.Physical.Total");
		return "Too much physical memory used (" . $event-&gt;parameters[4] . "), total: (" . total . ")"; // $4 is "Actual value"
	}
}
return $event-&gt;message;
</code></pre>
<p dir="auto">This is just an example, you need to adjust it to match your setup (e.g. if this action is used only for specific event in EPP, you can omit $event-&gt;id check the script).</p>
<p dir="auto">A bit more about using scripts in actions: <a href="https://www.netxms.org/forum/configuration/actions-parameter/msg3178/#msg3178" rel="nofollow ugc">https://www.netxms.org/forum/configuration/actions-parameter/msg3178/#msg3178</a></p>
<p dir="auto">If you need event with both values (e.g. for further processing), you can post custom event from transformation or threshold script (<a href="https://wiki.netxms.org/wiki/NXSL:PostEvent" rel="nofollow ugc">https://wiki.netxms.org/wiki/NXSL:PostEvent</a>)</p>
]]></description><link>https://forum.netxms.org/post/16155</link><guid isPermaLink="true">https://forum.netxms.org/post/16155</guid><dc:creator><![CDATA[alk]]></dc:creator><pubDate>Thu, 19 Mar 2015 12:21:13 GMT</pubDate></item></channel></rss>