[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

2081.0. "Alarms questions - wildcarding / entity existance" by HLRG02::GOES () Mon Jan 13 1992 07:36

Hi, I have some questions about the ALARMS FM.

Is it possible to wildcard entities in alarm rules ?

Is it possible to alarm the existance of an entity ?

What I mean is this: I want an alarm to be generated if an entity instance
                     exists. The alarm notification should contain the 
                     identifiers of the existent instances.

I want an alarm-rule to look like this:

 mcc> create mcc 0 alarms rule test -
_mcc> expression = (parent_entity_ci_pairs sub_entity_class * -
_mcc>               identifier exists, at every = 0:05:00),
_mcc> procedure = ...., exception handler = .... etc, etc, etc. 

If the show parent_entity_ci_pairs sub_entity_class * lists the following
instances: instance_1, instance_2 and instance_3 there must be 3 alarms
that indicate the existance of each of these alarms.

Can anyone help ?

Thanks in advance Paul Goes
T.RTitleUserPersonal
Name
DateLines
2081.1ALARMS wildcardingTOOK::ORENSTEINMon Jan 13 1992 15:2627
    
    This is what you can do with wildcards in an alarm expression:
    
    NO WILDCARD                       in the CHANGE_OF expression
    Sub-entity WILDCARDING            in the regular expression
    Global and sub-entity WILDCARDING in the OCCURS expression
    
    About your second question:
    
    If you have an entity that has an attribute that you always know
    the value of, then you can get an alarm for all its instances.
    The best way for me to describe this is with an example:  Let's
    say you create 10 rules , numbered ONE through TEN.  If you give
    each rule the same CATAGORY, then the rule entity has an attribute
    that you always know the value of.
    
    Then if you created the rule:
    
    create mcc 0 alarms rule what_are_the_rule_names -
    expression = (mcc 0 alarms rule * category = "This is my category")
    
    This rule "what_are_the_rule_names" will fire for each rule that 
    you have created.
    
    Does this make sense or answer your question?
    
    		aud...
2081.2Thanks, but ...HLRG02::GOESTue Jan 14 1992 03:3214
This is exactly what I was looking for !
But a few questions remain:

o What does the ALARMS FM with the wildcard ?
  I hope that it passes the wildcard to the SHOW-directive for the
  attribute that you always know the value of. If this is right it
  would solve a lot of my problems because the network traffic is much
  less when you specify a wildcarded SHOW-directive instead of seperated
  SHOW-directives (my network object sends all information of all entities
  in one call).

o Is this valid for DECmcc v1.1 or v1.2 (or maybe both) ?

Thanks, Paul Goes.
2081.3Yes, but what's the restTOOK::ORENSTEINTue Jan 14 1992 10:4512
    
    Yup, ALARMS passes the wildcard straight through to the SHOW directive.
    It does not enumerate the instances for you.
    
    >>>my network object sends all information of all entities in one call
    
    Do you mean that with a "SHOW foo <instance>" you pass back information
    as if they call were "SHOW foo *" ?   Is this what your are asking
    about when you ask if this is valid?
    
    	aud... 
    
2081.4Question remainsHLRG02::GOESMon Jan 20 1992 09:4354

>>    Do you mean that with a "SHOW foo <instance>" you pass back information
>>    as if they call were "SHOW foo *" ?   Is this what your are asking
>>    about when you ask if this is valid?

No this is not what I mean !

What I mean is this:

The PM Issues a "SHOW GLOBALCLASS .test CHILDCLASS *" directive to my AM.
My AM issues a request to the network object to request the needed information.
The network object is only capable of returning the needed information for
all instances of 'CHILDCLASS' and my AM receives an answer containing all
information for all instances.

My AM retrieves the information for the first instance and returns this to the
PM. The PM calls the AM again (because the wildcarded directive is not finished
yet) and the AM returns the information for the second instance (without
communicating with the network object -> it holds the received answer
from the networkobject in dynamically allocated memory that is free'ed when
the information of the last instance is returned).

This means that if the ALARMS FM specifies the wildcarded entity as a series
of non-wildcarded calls this would take much more time than if it specifies
it as the wildcarded entity.

QUESTION :

I define an attribute that always exists:
attribute = EXISTS  (Datatype Boolean) and the AM always returns for
this attribute the value TRUE.

Now I can define the alarm rule:
    create mcc 0 alarms rule what_are_the_rule_names -
    expression = (GLOBAL_CLASS .test CHILDCLASS * EXISTS = TRUE)

This rule will fire for every instance that has the EXISTS = TRUE, But ...

... What happens if there are no instances and the AM returns the
    Management Module dependent exception (Specialized Exception):
    'No Entities Found.'. To my opinion this fires the exception
    command file that is specified in the alarms rule. And this is
    an unwanted situation. There must be no alarm if there are no
    instances and there must be x alarms if there are x instances.
    There must also be an alarm if an exception other than the
    'No Entities Found' occurs.

Is it a valid solution to change the exception 'No Entities Found' into
a response. Does it fire the exception command file or not ???

Maybe someone knows the answer ??

Thanks in advance, Paul Goes
2081.5Answers and InfoTOOK::ORENSTEINMon Jan 20 1992 10:5030
    
    Your AM buffering sounds fine to me.  And yes, Alarms will pass the
    subentity wildcard down and have you enumerate it.  If we do provide
    Global Wildcarding, this will not be the case.  In this case, we will
    do the enumerating for you for the Global part -- the subentity part
    will still be your responsibility.
    
    As for your other questions:
    
    The only thing I can think of is for you to customize your exception
    handler procedure so that it doesn't take any action if the EVIDENCE
    has the string "NO SUCH ENTITY".  You must be careful when you return
    the NO ENTITY exception code that you do not set the optional argument
    "persistance" to"permanent".  If you set it this way, your rule will
    automatically become disabled.  If you do no set hte argument at all,
    the default is to just keep rolling along.
    
    As to changing you COMMON EXCEPTION to a RESPONSE code, you will have
    the following problem:  Alarms will see the response code and think,
    "Yippy we have an answer".  Alarms will then start looking through your
    out_P buffer for your attribute EXISTENCE.  Since your argument will
    not be found, Alarms will treat this as a missing attribute and will
    again fire off your exception procedure.  You could then customize
    your procedure for this case, though.
    
    If I can think of anyway to accomplish what you want, I will let
    you know.  In the mean time, I'll just try to answer your questions.
    
    	aud...
    
2081.6Use the NO-SUCH-ENTITY common exceptionNANOVX::ROBERTSKeith Roberts - DECmcc Toolkit TeamMon Jan 20 1992 13:1810
If would be better if you used the Common Exception:

	No Such Entity

instead of a specialized exeption (no entities found).

Generic MM's can then be programmed to process the list of Common Exceptions
and have a better idea of what to do when something goes wrong.

/keith