eventUtility script

Move events from a failed data center to a functioning data center so that they can be processed during a failure.

Usage

Use the eventUtility script to move events from one data center to another so that they can be processed during a failure. Use listEvents to generate a list of events based on certain criteria and resendEvents to resend the events. Use evaluateRules if you change the event rule to create events for files that match the changed rule, but did not match it before.

Use the eventUtility script to list the unprocessed files on data centers and to send them to be processed to different data centers.

File location

install_dir/MailboxUtilities/admin/bin

Environments

  • Linux® or UNIX (eventUtility.sh)
  • Windows (eventUtility.bat)

Authorization

You must be a Global Mailbox administrator to view and modify the eventUtility command line script.

To use the command line script, you must provide your Global Mailbox administrator user ID and password.

Syntax

./eventUtility.sh listEvents --appName=B2Bi --processStatus="UNPROCESSED" --outputFile=<path to file> --adminUser=<userid> --adminPassword=<password>
./eventUtility.sh resendEvents –-inputFile=<path to file> --appName=B2Bi --processStatus="PROCESSING" --outputFile=<path to file> --adminUser=<userid> --adminPassword=<password>
./eventUtility.sh resendEvents –-inputFile=<path to file> --appName=B2Bi --processStatus="UNPROCESSED" --outputFile=<path to file> --adminUser=<userid> --adminPassword=<password>
./eventUtility.sh evaluateRules --appName=B2Bi --mailbox=<mailbox name> --outputFile=<file name> --adminUser=admin --adminPassword=<password>
./eventUtility.sh listEvents --appName=B2Bi --processStatus="PROCESSING" --sourceDC=<failed DC> --targetDC=<Surviving DC>

listEvents option descriptions

The listEvents command can be used to generate a list of events based on the specifications of the following parameters:

--appName
The name of the application that receives the events. Required parameter. Accepted value is B2Bi.
--processStatus
The processing status of the returning events. Accepted values include "PROCESSING" and "UNPROCESSED". Required parameter.
--outputFile
The path to the file where the tool will output the list of events. Optional parameter. Events are listed in the following format: <event_id>|<process_status>|<publish_status>|<processing_dc>|<mailbox_id>|<mailbox_path>|<message_id>|<message_name>|<payload_type>|<payload_id>.
--adminUser
Global Mailbox administrator user. Optional parameter.
--adminPassword
Global Mailbox administrator password. A value for this parameter must be provided if --adminUser is specified. Optional parameter.
--sourceDC
The data center where files are not processed. The source data center might have started replicating the files, however the processing is not completed.
--targetDC
The data center to which files are to be sent for processing. Optional parameter.

resendEvents option descriptions

When resendEvents runs, events are published to the data center where the message was originally created. If the event cannot be published to the data center where the message was originally created, the script tries to publish the event to the next active data center, provided that the payload for the event has been replicated to that data center. If that fails, it tries with next data center until the data center list is exhausted, then the event is recorded as failed to publish.

The resendEvents command can be used to resend certain events based on the specifications of the following parameters:

--inputFile
The fully qualified path to the file containing the list of events to resend. Each line of the file must contain an event ID. Optional parameter. If this parameter is specified, --appName and --processStatus are ignored.
--appName
The name of the application that receives the events. Required if --inputFile is not defined. Accepted value is B2Bi.
--processStatus
The processing status of the returning events. Accepted values include "PROCESSING" and "UNPROCESSED". Required parameter.
--outputFile
The path to the file where events that can be successfully resent are written to. Optional parameter. Events are listed in the following format: <event_id>|<process_status>|<publish_status>|<processing_dc>|<mailbox_id>|<mailbox_path>|<message_id>|<message_name>|<payload_type>|<payload_id>.
--adminUser
Global Mailbox administrator user. Optional parameter.
--adminPassword
Global Mailbox administrator password. A value for this parameter must be provided if --adminUser is specified. Optional parameter.
--sourceDC
The data center where files are not processed. The source data center might have started replicating the files, however the processing is not completed.
--targetDC
The data center to which files are to be sent for processing. Optional parameter.

evaluateRules options descriptions

If the rule to re-evaluate applies to a message, and no event had been previously published for that message, an event is published to the data center where the message was originally created. If the event cannot be published to the data center where the message was originally created, the script tries to publish the event to the next active data center, provided that the payload for the event has been replicated to that data center. If this fails, it tries with next data center until the data center list is exhausted, then the event is recorded as failed to publish.

The evaluateRules command can be used to re-evaluate event rules based on the specifications of the following parameters:

--appName
The name of the application to evaluate rules for. Required parameter. Accepted value is B2Bi.
--mailbox
Evaluates the event rules that are mapped to the mailbox specified. Optional parameter. Only one mailbox can be specified. If not specified, all event rules for the application are evaluated.
--outputFile
The path to the file where each message that had events published as a result of evaluating the rules are written to. If specified, the file will have lines for each message in the following format: <msg_id>|<mailbox_name>|<message_name>|<event_rule_name>|.
--adminUser
Global Mailbox administrator user. Optional parameter.
--adminPassword
Global Mailbox administrator password. A value for this parameter must be provided if --adminUser is specified. Optional parameter.

Example outputFile for listEvents

0470a701-d94e-49cd-9978-96a43b18e8a4|UNPROCESSED|FAILED|Not specified|b0281c04-7353-40a3-942e-cab0b348351f|/ReplicationTest|2567f680-dec6-11e6-af85-6da78af12553|f2130471-3da7-4239-8d52-0ad52a0b0bbd|MEIG_STORAGE|f2130471-3da7-4239-8d52-0ad52a0b0bbd|
07781da2-5f94-4126-81c3-d2ffa3e14e51|UNPROCESSED|PUBLISHED|Not specified|021161c2-cb76-419d-942f-719530e2db80|/ReplicationTest|b7dc70a0-dcfe-11e6-907d-a55b81f28c91|segment1.dat|MEIG_STORAGE|98ab90ba-25d2-471e-8b1b-c19cd874c4fa|
10590a8c-f85b-45ba-b1de-ff6d0d9f96ad|UNPROCESSED|FAILED|Not specified|09671d5a-3644-4ce7-b7d4-a90feae102ff|/ReplicationTest|c77cdd70-de83-11e6-8a22-6da78af12553|test message 2|MEIG_STORAGE|bc2ea967-560b-4e26-a43c-71ee651863e6|
2cefcce6-afd2-424e-a772-09942ebb28e3|UNPROCESSED|PUBLISHED|Not specified|0364c168-026b-43cd-8b5b-0d0c49c9e474|/gvega|bb57ea30-e33d-11e6-adce-6da78af12553|5e2d0c80-b88c-4e74-b228-3cb5ca676b77|MEIG_STORAGE|5e2d0c80-b88c-4e74-b228-3cb5ca676b77|
2d3bf759-997f-42ca-b06f-9120ce6383e7|UNPROCESSED|PUBLISHED|Not specified|0364c168-026b-43cd-8b5b-0d0c49c9e474|/gvega|37ae5df0-e328-11e6-b0d4-6da78af12553|014cdc84-5bae-4a21-a44e-6ca0f20b9663|MEIG_STORAGE|014cdc84-5bae-4a21-a44e-6ca0f20b9663|
34526ba9-11db-44bd-8a37-99dad2fa5ca1|UNPROCESSED|PUBLISHED|Not specified|fd8f3f93-9165-4e54-af35-df88575f7c55|/ReplicationTest|3ecfac60-e274-11e6-9def-6da78af12553|291a03b9-dc59-4740-b4bf-22e3a59b5a77|MEIG_STORAGE|291a03b9-dc59-4740-b4bf-22e3a59b5a77|

Example inputFile file for resendEvents

0470a701-d94e-49cd-9978-96a43b18e8a4
07781da2-5f94-4126-81c3-d2ffa3e14e51
10590a8c-f85b-45ba-b1de-ff6d0d9f96ad
Note: eventUtility ignores any data after the 36th character of each line, so the output of listEvents can be fed as input to resendEvents.

Example outputFile for evaluateRules

d3d30860-3fdb-11e7-9bdc-4d30819d0460|/CFLConsumer|document01.txt|CFLProducer_CFLConsumer_CustomFL|
d03c7420-3fdb-11e7-9bdc-4d30819d0460|/CFLConsumer|document02.doc|CFLProducer_CFLConsumer_CustomFL|
d027b3a0-3fdb-11e7-9bdc-4d30819d0460|/CFLConsumer|document03.xls|CFLProducer_CFLConsumer_CustomFL|
cef15680-3fdb-11e7-9bdc-4d30819d0460|/CFLConsumer|document04.pdf|CFLProducer_CFLConsumer_CustomFL|
63a69a20-3fdb-11e7-9bdc-4d30819d0460|/CFLConsumer|document05.exe|CFLProducer_CFLConsumer_CustomFL|
5edf7520-3fdb-11e7-9bdc-4d30819d0460|/CFLConsumer|document06.txt|CFLProducer_CFLConsumer_CustomFL|