| I would recommend NOT having multiple rules for the same condition. Alarms
was specifically designed to handle custom situations like this by providing
the ability to execute a user-defined script when a rule fires.
The mcc_alarms_*.com procedures provided with the kit are examples of how to
write action procedures. They're certainly not intended to restrict the user
as far as possible reactions to an alarm rule firing.
It should be simple to write a command procedure that invokes two or more of
the example procedures, as well as checking the day/time to determine whether
the "normal" or "off hours" actions should be taken. You're right that the
parameter usage will have to be modfied slightly. I would consider taking
the out-of-the-box procedures and creating new versions that are specifically
built to deal with multiple parameters, for example, assume that the
parameter format is:
mail_user_names|logfilename|broadcast_user_names
and have each procedure parse its parameter out of the single parameter
e.g. mail_param = f$element(0,"|",parameter_string)
log_param = f$element(1,"|",parameter_string)
broadcast_param = f$element(2,"|",parameter_string)
or just combine the "meat" of the example procedures into one procedure that
does whatever the customer requires.
The parameter parsing stuff could all be more trouble than its worth. You may
want to just write command procedures that get the mail/broadcast/logging
information from (for example) an external source (a distribution list file).
This would give the customer additional flexibility because if the set of
interested parties changes, the rule itself wouldn't have to be re-created,
as is presently necessary.
|
| Another alternative would be to use a utility like DELIVER which watches
mail, and then executes commands based on mail received. (This more on the
kludgy end then Pete's suggestion, but there may be situations where it
has benefits.) I believe DELIVER is in the Toolshed.
Since it was written outside of DEC I think it is public domain.
-Dave
|