T.R | Title | User | Personal Name | Date | Lines |
---|
2081.1 | ALARMS wildcarding | TOOK::ORENSTEIN | | Mon Jan 13 1992 15:26 | 27 |
|
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.2 | Thanks, but ... | HLRG02::GOES | | Tue Jan 14 1992 03:32 | 14 |
| 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.3 | Yes, but what's the rest | TOOK::ORENSTEIN | | Tue Jan 14 1992 10:45 | 12 |
|
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.4 | Question remains | HLRG02::GOES | | Mon Jan 20 1992 09:43 | 54 |
|
>> 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.5 | Answers and Info | TOOK::ORENSTEIN | | Mon Jan 20 1992 10:50 | 30 |
|
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.6 | Use the NO-SUCH-ENTITY common exception | NANOVX::ROBERTS | Keith Roberts - DECmcc Toolkit Team | Mon Jan 20 1992 13:18 | 10 |
| 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
|