Check Operations Monitor Alert Files

OMACHECK [omaname ...]

This program allows you to select and monitor one or more OMA files that are written by each COPIAFACTS server engine program( and other programs) every fifteen seconds. If an OMA file is found to be older than a specified interval, OMACHECK can launch a program you supply, or reboot the node.

From CopiaFacts 8.2, you can use EMSETUP to configure EMDIRECT to send an e-mail automatically whenever OMACHECK is triggered on node failure. We no longer recommend that you run the OMACK.BAT file for notification purposes, because this requires that a CopiaFacts node is still running to send the e-mail, whereas EMDIRECT does not.  See below.
From CopiaFacts, the OMACHECK program has been redesigned so that:

You no longer have to enter 'extra' OMA filenames on the command line.  Once added to the list, the details are saved in the registry.  However if a filename is  present on the command line it will be added to the saved 'extra' OMA files the first time the new version is run.  COPIAFACTS.INI is no longer used for settings, except on the first execution of this version.

You can specify a separate executable, batch or command file for each OMA trigger; however (see above) we recommend that you use the built-in triggers to send an e-mail when OMACHECK is activated, instead of using a batch file.

Document Converter licensed nodes (ones with an assigned nodename) are picked up automatically.

It allows a blackout period to be specified when OMACHECK will not trigger.  This allows applications to be closed for backup or other maintenance.

When run elevated on a CFGATEWAY node, the program checks to see if the SMTP port is being listened to, and restarts the service if not.  As with OMA files, the trigger does not occur until a listening port has been detected, and then later is not found.

OMA files written by other than the COPIAFACTS server engine (e.g. FFEXTERN.OMA, JOBMON.OMA) must be explicitly added to the list of OMA files using the Add button on the dialog.  Only manually added items can be deleted; the items automatically picked from the HWL file can only be disabled, not deleted.  No path need be specified because these files are always written in the LOG folder under the base CopiaFacts folder. Missing OMA files appear in red in the display and 'old' files in blue.

You could specify as the launched program a utility to send you e-mail or send an SMS message to your pager, or take any other action you require. The delay interval that you can specify allows for differences in time settings between the nodes on your network, or allows time for another auto-restart procedure to attempt to restart COPIAFACTS or the network node.

Iconizing the program (using the Start Monitoring button) causes it to start monitoring the specified OMA files. OMACHECK is not monitoring when you can see its window.

Note the following features in the above screen shot:

OMA Check is not monitoring; it does not start until you click 'Start Monitoring'

M1, M2 and M4 to M7 are not running and have not been run for a while

If M2 is triggered, a batch file will be run.  In all the other engine nodes, messages will only be sent if configured in EMSETUP triggers.

M3, DC1 and GATEWAY are active and will be monitored when OMACHECK starts.

Nodes DC1 and TEST will be rebooted if their OMA is triggered.

The mouse cursor has enabled the Edit button which floats in the action column

A blackout period has been set which suppresses monitoring for the specified period.

The program is running elevated on a CFGATEWAY node on which port monitoring has been enabled.  The message box appears only when this is the case.

The reboot option allows you to force reboot of a machine when the OMA check is triggered. To do this you must provide the machine name to match each node that you are monitoring and wish to reboot. It is also necessary to be logged in to the machine in question with sufficient privileges to allow you to reboot it.  For information about setting such privilege, see NTREBOOT.  After launching the command, if specified, OMACHECK waits one minute before performing the reboot. After performing any reboot, OMACHECK suppresses all actions for ten minutes.

The "Command-line to execute" box must contain a valid Windows command line. If the pathname of the program contains blank spaces, double-quotes must be used to enclose the pathname. If you wish to perform different actions depending on which OMA file has 'failed', you can use the values @node, @machine @pfc and @pfd in the command line to be run. No other CopiaFacts system variables are expanded. The @node is expanded to the nodename (e.g. M1) and the @machine to the machine name to be rebooted (e.g. \\FAXFACTS). If no reboot is specified, the @machine variable expands to blank.

The command-line is executed with the current folder as the Program Files\Copia folder.  You can also use the FAXFACTSDIR environment variable to access the FAXFACTS folder (UNC pathname), and the FAXFACTSLOCAL environment variable will contain the local name of this folder if it is local.  The latter variable will only be set automatically if you have run SERCONF build or later.  The command-line is run before the reboot operation is performed, if specified, and running a command causes the reboot to be delayed one minute.

No action will be taken for a missing or old OMA file until a corresponding 'good' (i.e. recent) OMA file has been seen. This feature works both on starting OMACHECK and after an OMA failure has been detected for which no machine reboot has been specified. This allows you to restart a node manually and avoids repeated triggering of OMACHECK after the node has failed once. On the other hand, if you set OMACHECK to reboot a failed node, OMACHECK will trigger again (after ten minutes) if the reboot has failed to make the OMA file current.

To monitor an active CopiaFacts system it is important to run OMACHECK on a machine other than those running your critical CopiaFacts applications.  The machine running OMACHECK must be able to see the COPIA\FAXFACTS\LOG folder where the .OMA files are located.

If you need to run OMACHECK with elevated privilege, so that it can reboot machines or restart services, you must ensure that OMACHECK is always started in this way.  The best way to do this is to start it using Windows Task Scheduler, which has an option to run a process elevated at system startup and does not ask for UAC authorization.

Sending an e-mail to notify that OMACHECK has fired

Earlier releases used an OMACK.BAT file to call EMTO to send an e-mail.  Because EMTO wrote an FS file to send an e-mail, the e-mail would only be sent if there was a CopiaFacts node still running and configured for sending e-mails.  The notification could therefore fail if multiple nodes were affected by a problem, or if only one CopiaFacts node was configured.

To improve the reliability of notifications, it is strongly recommended that you do not use the batch file process to send an e-mail.  Instead:

Run EMSETUP on the node which is running OMACHECK.

Enter the details of your mailserver and the default notification address(es)

Make sure that 'Enabled for System Notifications' is checked.

Click on Set up Notification Triggers and ensure that OMACHECK is checked.  Custom notification addresses can also be specified by clicking the underlined OMACHECK.

When EMDIRECT is invoked by OMACHECK, it also appends the last ten CopiaFacts Windows Event Log messages to the e-mail text.

When you have set this up and tested you can clear the OMACHECK 'Command line to run' boxes unless you need additional special processing.