Complex container status
-
Hi again!
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:
A status Up Up Down Down B status Up Down Up Down Location status Normal Normal Minor MajorI have created a condition under same container of A and B, with next condition script:
//trace(0,$1); //trace(0,$2); if ($1>0){ if ($2>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 $endPlease, is there any way to change condition active state defined in General tab, from inside script?
Please, is there another way to get needed states?Thanks in advance.
-
Hi!
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.
Best regards,
Victor -
Hi.
A and B are routers nodes.
"Location" is a container for A and B nodes: the city where they are located.Next table show status for "Location" container, based in A and B nodes statuses:
[tr][td]If node A change to Normal Normal Critical Critical
If node B change to Normal Critical Normal Critical
Location status must be Normal Normal Minor Major.
However, I believe that a condition should be able to change his status to the same status returned from his own script.
Best regards.
-
Hi!
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.
For your case, I see the following solution (not very elegant though):
- 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;
- Create 2 conditions in same location, each having DCI Status for node A and node B as data (A Status first).
- For condition 1, set active status to "Minor" and inactive to "Normal", and use the following script:
($1 == 4) && ($2 == 0)
- For condition 1, set active status to "Major" and inactive to "Normal", and use the following script:
($1 == 4) && ($2 == 4)
Should work

Best regards,
Victor -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login