[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

1541.0. "probl: failure on enable rule -> No errorrmessage" by STKHLM::BERGGREN (Nils Berggren EIS/Project dpmt, Sweden DTN 876-8287) Tue Sep 24 1991 11:12

Hi,

I have written an AM, named SEBAM, which supports the GETEVENT-directive.

Now when enabling a rule that have an expression like 
    'OCCURS (SEBAM  .SEBAM.SEB075  APPLICATION * <event-name> )'
my getevent-routine gets called.  

One of the first things that happens in the getevent-routine is to set up 
a link to the target-agent.  If that fails, it returns a spec-exception
telling "Unable to connect agent" and no call to mcc_event_get is done. 
Now, even if this happens, I get "Normal operation has begun" and I have to 
do a 'show status' on the rule to see that the rule is disabled and the 
Error Condition  tells me "Unable to connect agent". 

    THIS IS NO GOOD!

We have a LOT (3-digit number) of rules and aprox 200 SEBAM-agents
and we don't want to check if each rule is enabled properly.

Wouldn't it be nice to get that error-condition output instead of "Normal
operation has begun"?  Is it possible?  Have I missed something?


   Thanks,
   /Nils
T.RTitleUserPersonal
Name
DateLines
1541.1Enable Rule creates a 'detached' threadNANOVX::ROBERTSKeith Roberts - DECmcc Toolkit TeamTue Sep 24 1991 11:2524
Nils,

The Enable Rule directive creates a Rule-Driver deatached thread, passing
it the name of the Rule which you are enabling.  If the Rule exists, and
the thread could be created - Enable returns (the Normal status).  If any
errors occur, you receive the exception.

The Rule-Driver thread is now running in the background - if it has a problem
processing the Rule it records the error-condition (status attribute) and
disables the rule

The Enable directive can not really wait on a successful Rule because it
could take seconds - to days - for the Rule to complete (like if it was a 
Rule on an event).

The Alarms Package *does* generate an Event when a Rule is Disabled.  One
of the Event-Report Arguments is why the Rule was disabled <by user, by error>
and if it was <by error>, another Argument tells what the error was; in your
case "Unable to connect to agent"

I understand your situation - but can not think of how the Enable directive
can return the information you are looking for.

Keith
1541.2implied by KeithTOOK::CALLANDERMCC = My Constant CompanionWed Sep 25 1991 21:3511
what Keith implied, just to make clear for new readers, is that you
have two options (due to the design constraints that he mentioned).

1) create rule that looks for the rule disabled event on domain x rule *

2) have the rule exception handler notify you (mail, broadcast...) that
   rule disabled.

and in V1.2 another option will be to use the data collector AM. This module
wil allow you to bring other events into the system...but more on this
later.