<?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[Complex container status]]></title><description><![CDATA[<p dir="auto">Hi again!</p>
<p dir="auto">My network provider supplies me a main 100 Mbs bandwith line (A) and a backup 10 Mbs bandwith line (B) for a given location.  I need status container follow:</p>
<pre><code>A status		Up	Up	Down	Down
B status		Up	Down	Up	Down
Location status		Normal	Normal	Minor	Major
</code></pre>
<p dir="auto">I have created a condition under same container of A and B, with next condition script:</p>
<pre><code>//trace(0,$1);
//trace(0,$2);
if ($1&gt;0){
	if ($2&gt;0)
		return 3;	//Return MAJOR
	else
		return 2;	// return MINOR
	}
return 0;			// return NORMAL
// blank last line is required for elude:
// syntax error, unexpected '/', expecting $end
</code></pre>
<p dir="auto">Please, is there any way to change condition active state defined in General tab, from inside script?<br />
Please, is there another way to get needed states?</p>
<p dir="auto">Thanks in advance.</p>
]]></description><link>https://forum.netxms.org/topic/1151/complex-container-status</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:40:34 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/1151.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Feb 2011 13:29:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Complex container status on Tue, 01 Mar 2011 12:46:39 GMT]]></title><description><![CDATA[<p dir="auto">Hi Victor,</p>
<p dir="auto">Of course, by using two or more conditions!. I would have never come to mind :-[.</p>
<p dir="auto">Now, desired container status work fine.</p>
<p dir="auto">Thank you very much again.</p>
]]></description><link>https://forum.netxms.org/post/5224</link><guid isPermaLink="true">https://forum.netxms.org/post/5224</guid><dc:creator><![CDATA[testos]]></dc:creator><pubDate>Tue, 01 Mar 2011 12:46:39 GMT</pubDate></item><item><title><![CDATA[Reply to Complex container status on Fri, 25 Feb 2011 12:15:16 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Condition can have only two statuses - when it is active and when it is not active. Condition script expected to return true or false - if it returns true, condition considered as "active", and it's status changed appropriately.</p>
<p dir="auto">For your case, I see the following solution (not very elegant though):</p>
<ol>
<li>On nodes A and B, set status propagation to fixed value "Normal" - this will ensure that they will not change status of parent location directly;</li>
<li>Create 2 conditions in same location, each having DCI Status for node A and node B as data (A Status first).</li>
<li>For condition 1, set active status to "Minor" and inactive to "Normal", and use the following script:</li>
</ol>
<p dir="auto">($1 == 4) &amp;&amp; ($2 == 0)</p>
<ol start="3">
<li>For condition 1, set active status to "Major" and inactive to "Normal", and use the following script:</li>
</ol>
<p dir="auto">($1 == 4) &amp;&amp; ($2 == 4)</p>
<p dir="auto">Should work <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="🙂" /></p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/5194</link><guid isPermaLink="true">https://forum.netxms.org/post/5194</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 25 Feb 2011 12:15:16 GMT</pubDate></item><item><title><![CDATA[Reply to Complex container status on Thu, 24 Feb 2011 11:44:30 GMT]]></title><description><![CDATA[<p dir="auto">Hi.</p>
<p dir="auto">A and B are routers nodes.<br />
"Location" is a container for A and B nodes: the city where they are located.</p>
<p dir="auto">Next table show status for "Location" container, based in A and B nodes statuses:</p>
<p dir="auto">[tr][td]If node A change to				   Normal		Normal		Critical			Critical<br />
If node B change to				   Normal		Critical		Normal			Critical<br />
<strong>Location status must be     Normal     Normal     Minor          Major</strong></p>
<p dir="auto">.</p>
<p dir="auto">However, I believe that a condition should be able to change his status to the same status returned from his own script.</p>
<p dir="auto">Best regards.</p>
]]></description><link>https://forum.netxms.org/post/5188</link><guid isPermaLink="true">https://forum.netxms.org/post/5188</guid><dc:creator><![CDATA[testos]]></dc:creator><pubDate>Thu, 24 Feb 2011 11:44:30 GMT</pubDate></item><item><title><![CDATA[Reply to Complex container status on Thu, 24 Feb 2011 10:06:24 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">What is A, B, and "Location" - containers? If you need to calculate status of Location based on statuses of subcontainers A and B, the beset way is to use status calculation/propagation rules. If this is the case, tell me what statuses could have A and B, and I'll try to create rules for your requirement.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/5186</link><guid isPermaLink="true">https://forum.netxms.org/post/5186</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Thu, 24 Feb 2011 10:06:24 GMT</pubDate></item></channel></rss>