Automatic Notifications
CopiaFacts provides a built-in mechanism for automatically sending e-mail notifications when necessary. The triggers for notifications are configured in the EMSETUP program. The notifications are sent by EMDIRECT and do not depend on a COPIAFACTS e-mail node still being running when a notification message is required.
In order to keep notifications independent of COPIAFACTS nodes, you need to ensure that EMSETUP has been run on each node which may need to initiate notifications, and that EMDIRECT is available on that node. EMSETUP has a feature which allows settings to be saved in the FAXFACTS folder and loaded by another EMSETUP instance on another node; but this must be done in advance so that EMDIRECT does not require access to the FAXFACTS folder at the time a notification is to be sent.
Notifications are only sent if a notification from the same trigger has not been raised in the last ten minutes. For OMACHECK activation, the most recent ten events from the Windows event log are automatically appended to the e-mail message. EMSETUP can be configured so that notifications from different triggers can be sent to different recipients, and multiple recipients can also be specified, with optional copies sent to Copia.
Non-Automatic Notifications
You can also generate notification messages from your own batch files or infoboxes when unusual conditions arise in your own applications running in CopiaFacts. There are three ways to do this:
•Call EMDIRECT directly from a batch file. The command-line parameters are documented in the EMDIRECT topic,. with examples.
•Assign a message to the variable NOTIFY_MESSAGE in an infobox. This requires that the NOTIFY MESSAGE trigger is enabled in EMSETUP for the node on which COPIAFACTS is processing the infobox.
•Call EMTO from a batch file or $run command. For example:
CFUTIL EMTO steve@copia.com s="Failure in MYBATCH.CMD"
Note that EMTO operates by writing an FS file into the TOSEND folder, so successful notification depends on there being a CopiaFacts e-mail node still running which is configured for e-mail, and on the ability to see the TOSEND folder on the fileserver on which the COPIA share resides. EMDIRECT on the other hand sends an e-mail direct by logging in to your normal e-mail provider's SMTP server.
After setting up notification actions, you should test them by initiating various failure scenarios.
Logging
The Triggers dialog in EMSETUP allows a log file to be specified for all EMDIRECT actions. We recommend a local folder for this log. You can also log OMACHECK actions by running a batch file from OMACHECK.
Where you write the log file will depend on whether OMACHECK is running on a processing node, on the fileserver, or elsewhere. Your batch file could include the commands:
cd /D %TEMP%
time /t >>omalog.txt
date /t >>omalog.txt
echo OMA activated for machine=%1 node=%2 >>omalog.txt
The supplied OMACKBT.BAT or OMACKBW.BAT file which is installed in the Program Files\Copia folder includes some of the above examples: This file will need modification before use, to suit your configuration and circumstances.