<?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[help with aggregate DCI]]></title><description><![CDATA[<p dir="auto">Hi, i'm configuring node for my exchange server and i need to create a dci that is the average of this performance counter</p>
<p dir="auto">\MSExchange ADAccess Domain Controllers(DC)\LDAP Search Time</p>
<p dir="auto">for all my domain controllers.</p>
<p dir="auto">can someone help me? give me an input to create a script?</p>
<p dir="auto">thank you</p>
<p dir="auto">Andrea</p>
]]></description><link>https://forum.netxms.org/topic/5563/help-with-aggregate-dci</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 07:23:48 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/5563.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 May 2018 13:10:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to help with aggregate DCI on Wed, 18 Dec 2019 09:33:48 GMT]]></title><description><![CDATA[<p dir="auto">Thumbs up for this topic! To calculate Total Space Used on all filesystems, into single aggregate DCI:</p>
<pre><code>UsedSpaceTotal=0;
foreach (dci : FindAllDCIs($node,"FileSystem.Used*") )
{
	dciValue = GetDCIValue($node,dci-&gt;id);
	if ( dciValue == null ) continue; // To skip in case of errors
	UsedSpaceTotal+=dciValue;
}
return UsedSpaceTotal;
</code></pre>
]]></description><link>https://forum.netxms.org/post/27162</link><guid isPermaLink="true">https://forum.netxms.org/post/27162</guid><dc:creator><![CDATA[Hospital]]></dc:creator><pubDate>Wed, 18 Dec 2019 09:33:48 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Tue, 17 Sep 2019 05:05:12 GMT]]></title><description><![CDATA[<p dir="auto">Such a simple mistake. <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="🙂" /> Got it working now, many thanks.</p>
]]></description><link>https://forum.netxms.org/post/26549</link><guid isPermaLink="true">https://forum.netxms.org/post/26549</guid><dc:creator><![CDATA[Egert143]]></dc:creator><pubDate>Tue, 17 Sep 2019 05:05:12 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Mon, 16 Sep 2019 15:50:39 GMT]]></title><description><![CDATA[<p dir="auto">You initialize variable activeDCIs to 1, which gives you incorrect result - if you have 36 cores line</p>
<p dir="auto">activeDCIs++;</p>
<p dir="auto">will be execured 36 times and result will be 37.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/26545</link><guid isPermaLink="true">https://forum.netxms.org/post/26545</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 16 Sep 2019 15:50:39 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Mon, 16 Sep 2019 15:02:26 GMT]]></title><description><![CDATA[<pre><code>searchTimeTotal = 0;
activeDCIs=1;

foreach (dci : FindAllDCIs($node,".1.3.6.1.2.1.25.3.3.1.2.*") )
{

	dciValue = GetDCIValue($node,dci-&gt;id);

	if ( dci-&gt;name like "*{instance}" ) continue;


	if ( dciValue == null ) continue;


	searchTimeTotal+=dciValue;
	activeDCIs++;
}

return activeDCIs;
//return round(searchTimeTotal/activeDCIs,2);
</code></pre>
<p dir="auto">Cpu DCI:<br />
Description: Cpu {instance}<br />
parameter: .1.3.6.1.2.1.25.3.3.1.2.{instance}<br />
discovery: snmp walk:.1.3.6.1.2.1.25.3.3.1.2</p>
<p dir="auto">the result i am looking for should be 36 (36 cores), but i am getting 37 instead.</p>
]]></description><link>https://forum.netxms.org/post/26544</link><guid isPermaLink="true">https://forum.netxms.org/post/26544</guid><dc:creator><![CDATA[Egert143]]></dc:creator><pubDate>Mon, 16 Sep 2019 15:02:26 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Mon, 16 Sep 2019 13:52:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/egert143" aria-label="Profile: egert143">@<bdi>egert143</bdi></a> said in <a href="/post/26536">help with aggregate DCI</a>:</p>
<blockquote>
<p dir="auto">When i use "if (dci-&gt;name like "*{instance}") continue;" it doesent match.</p>
</blockquote>
<p dir="auto">Please share full script code. I checked on my system and it works as expected.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/26541</link><guid isPermaLink="true">https://forum.netxms.org/post/26541</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 16 Sep 2019 13:52:57 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Mon, 16 Sep 2019 12:39:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/egert143" aria-label="Profile: egert143">@<bdi>egert143</bdi></a> said in <a href="/post/26536">help with aggregate DCI</a>:</p>
<blockquote>
<p dir="auto">When i add "dciValueB = GetDCIValue($node,dci-&gt;name);" then i already get dci unsupported error.</p>
<p dir="auto">When i use "if (dci-&gt;name like "*{instance}") continue;" it doesent match.</p>
</blockquote>
<p dir="auto">You should do: "dciValueB = GetDCIValue($node,dci-&gt;id);"<br />
As GetDCIValue requires node object and DCI id as a parameters: <a href="https://www.netxms.org/documentation/nxsl-3.0/#func-getdcivalue" rel="nofollow ugc">https://www.netxms.org/documentation/nxsl-3.0/#func-getdcivalue</a></p>
]]></description><link>https://forum.netxms.org/post/26538</link><guid isPermaLink="true">https://forum.netxms.org/post/26538</guid><dc:creator><![CDATA[zev]]></dc:creator><pubDate>Mon, 16 Sep 2019 12:39:34 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Mon, 16 Sep 2019 11:03:33 GMT]]></title><description><![CDATA[<p dir="auto">When i add "dciValueB = GetDCIValue($node,dci-&gt;name);" then i already get dci unsupported error.</p>
<p dir="auto">When i use "if (dci-&gt;name like "*{instance}") continue;" it doesent match.</p>
]]></description><link>https://forum.netxms.org/post/26536</link><guid isPermaLink="true">https://forum.netxms.org/post/26536</guid><dc:creator><![CDATA[Egert143]]></dc:creator><pubDate>Mon, 16 Sep 2019 11:03:33 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Mon, 16 Sep 2019 07:56:01 GMT]]></title><description><![CDATA[<p dir="auto">You can do something like</p>
<pre><code>for (dci : FindAllDCIs($node, ".1.3.6.1.2.1.25.3.3.1.2.*"))
{
   if (dci-&gt;name like "*{instance}")
      continue;
   // your code here
}
</code></pre>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/26532</link><guid isPermaLink="true">https://forum.netxms.org/post/26532</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 16 Sep 2019 07:56:01 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Mon, 16 Sep 2019 05:17:47 GMT]]></title><description><![CDATA[<p dir="auto">Nice got that bit to work, indeed i was mixing parameter name and description.</p>
<p dir="auto">But i have one tiny problem still: The cpu dci-s are auto generated by instance, and ".1.3.6.1.2.1.25.3.3.1.2.{instance}" counts as result also when searching with "foreach (dci : FindAllDCIs($node,".1.3.6.1.2.1.25.3.3.1.2.*") )", how can i filter that one out ?</p>
]]></description><link>https://forum.netxms.org/post/26530</link><guid isPermaLink="true">https://forum.netxms.org/post/26530</guid><dc:creator><![CDATA[Egert143]]></dc:creator><pubDate>Mon, 16 Sep 2019 05:17:47 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Sun, 15 Sep 2019 15:21:02 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">yes, script is valid, but you have to remember that it search DCIs by name (parameter name). Are you sure you have parameter names Cpu 1, etc. and not DCI descriptions?</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/26527</link><guid isPermaLink="true">https://forum.netxms.org/post/26527</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Sun, 15 Sep 2019 15:21:02 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Sun, 15 Sep 2019 11:41:55 GMT]]></title><description><![CDATA[<p dir="auto">Hello</p>
<p dir="auto">Sorry for digging up an old topic. Is this script supposed to work with current version ?</p>
<p dir="auto">I made new script out of it and changed line:</p>
<p dir="auto">"foreach (dci : FindAllDCIs($node,"\\MSExchange ADAccess Domain Controllers(*)\\LDAP Search Time") )"<br />
 to<br />
"foreach (dci : FindAllDCIs($node,"Cpu *") )".</p>
<p dir="auto">then added new dci with origin script and parameter selected as above script, i get result: -nan(ind) / result 0.</p>
<p dir="auto">data looks like:</p>
<p dir="auto">Cpu 1, Cpu 2, Cpu 3 etc. What am i dooing wrong ?</p>
]]></description><link>https://forum.netxms.org/post/26525</link><guid isPermaLink="true">https://forum.netxms.org/post/26525</guid><dc:creator><![CDATA[Egert143]]></dc:creator><pubDate>Sun, 15 Sep 2019 11:41:55 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Thu, 07 Jun 2018 13:18:07 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">The following should work.</p>
<pre><code>searchTimeTotal = 0;
activeDCIs=0;
foreach (dci : FindAllDCIs($node,"\\MSExchange ADAccess Domain Controllers(*)\\LDAP Search Time") )
{
	dciValue = GetDCIValue($node,dci-&gt;id);
	if ( dciValue == null ) continue; // To skip in case of errors
	searchTimeTotal+=dciValue;
	activeDCIs++;
}
return format((searchTimeTotal/activeDCIs),2); // You may want to change the number of decimals or round instead.
</code></pre>
<p dir="auto">Cheers</p>
]]></description><link>https://forum.netxms.org/post/24385</link><guid isPermaLink="true">https://forum.netxms.org/post/24385</guid><dc:creator><![CDATA[Tursiops]]></dc:creator><pubDate>Thu, 07 Jun 2018 13:18:07 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Tue, 15 May 2018 14:25:19 GMT]]></title><description><![CDATA[<p dir="auto">Hi, thank you for reply, but i need to create a dci with average value of these DCI (i have 4 domain controllers)</p>
<p dir="auto">\\MSExchange ADAccess Domain Controllers(DC1)\\LDAP Search Time<br />
\\MSExchange ADAccess Domain Controllers(DC2)\\LDAP Search Time<br />
\\MSExchange ADAccess Domain Controllers(DC3)\\LDAP Search Time<br />
\\MSExchange ADAccess Domain Controllers(DC4)\\LDAP Search Time</p>
<p dir="auto"> I need to create a new dci with value that is average of these DCI's value.</p>
<p dir="auto">I understood that i need to create a script and after link this script to a new DCI.</p>
<p dir="auto">thank you</p>
<p dir="auto">Andrea</p>
]]></description><link>https://forum.netxms.org/post/24270</link><guid isPermaLink="true">https://forum.netxms.org/post/24270</guid><dc:creator><![CDATA[it_user1]]></dc:creator><pubDate>Tue, 15 May 2018 14:25:19 GMT</pubDate></item><item><title><![CDATA[Reply to help with aggregate DCI on Mon, 14 May 2018 20:08:19 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">you can create another script DCI with script like this:</p>
<pre><code>return GetAvgDCIValue($node, FindDCIByName($node, "\\MSExchange ADAccess Domain Controllers(DC)\\LDAP Search Time"), time() - 3600, time());
</code></pre>
<p dir="auto">It will return average value for last hour. Note that \ are doubled in DCI name because it is an escape character in NXSL string.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/24258</link><guid isPermaLink="true">https://forum.netxms.org/post/24258</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 14 May 2018 20:08:19 GMT</pubDate></item></channel></rss>