print_event_repository_loader_trace.py

The print_event_repository_loader_trace.py script displays the status of an Event Loader service that is running on the publishing server, and the traces of its MATRIXX Event File (MEF) processing and associated statuses.

Note: In multi-tenant MATRIXX installations, run this script on the base Event Repository only.

Syntax

print_event_repository_loader_trace.py --host serverName|ipAddress --port portNumber [-u username] [[interval] [count]] [--version] [-v] [--uri=full_MongoDB_uri] [--srv] [-g] [-s] [--eventDatabase TenantDatabaseName] [--authDatabase AuthenticationDatabaseName] [-h]

Options

interval
The interval to wait before running the script (repeating the command) again. The interval is a number in seconds. The full interval is the number in seconds (specified) plus the command runtime.
count
The number of times to run the script (repeat the command) in succession. If you specify an interval without specifying a count, the script repeats the command indefinitely. For example, to run the script three times:
print_event_repository_loader_trace.py --user MtxAdmin --host my-hostname-123 --count 3
-u username, --user=username
Specify the MongoDB user to log in as.
-v, --verbose
Runs the script in verbose mode and returns more details as standard output.
--uri
The full URI for the MongoDB or MongoDB Atlas database. If the username or password has any special characters, they must be URI-encoded, for example, if the password has an @ character, it must be in the URI as %40. If the URI has an ampersand (&), the & must be escaped (preceded by a backslash (\&)) or the full URI must be inside quotes, for example:
uri=mongodb+srv://cluster0.8n9ep.mongodb.net/MtxEventDatabase?retryWrites=true\&option=value

uri="http://host/path?var1=val1&var2=val2"
Note: When entering the URI in create_config.py, if the URI has an &, it must be escaped (\&) to prevent the configuration file from becoming invalid. This option is needed only if there are other MongoDB driver parameters (like LDAP) that are not handled by the other options. If you specify a URI, and the event database is not MtxEventDatabase, you must also specify the --eventDatabase option.
--srv
If this parameter is specified, an SRV-based URI is generated for a MongoDB Atlas database. If this parameter is not specified, a regular MongoDB database URI is generated.
--version
Show the program version number.
--host=serverName|ipAddress
The MongoDB server to connect to. This option specifies the host name or IP address of a machine on which one of the mongod instances in your replica set is running. Connecting to a machine on which your primary mongod is running is recommended.
--port
The MongoDB server port to connect to. Specify this option only if the port is not the default (27017).
-g, --gap-list
Generate a list of missing event Global Transaction Counter (GTC) gaps of loaded MEFs from the Loader Trace Collection that might require recovery.
Note: If you specify the -g option, only the GTC gaps are listed, and the rest of the information normally generated by this script is not created.
-s, id --sub-domain=id
Specifies the sub-domain of interest. Only gaps and loading activities in the specified sub-domain are listed.
--eventDatabase
(Optional) The name of the tenant database. Specify this option as needed for tenant repository queries. The default value is MtxEventDatabase. If you specify a URI, and the event database is not MtxEventDatabase, you must specify the --eventDatabase option.
--authDatabase
(Optional) The name of the database to be used for the authentication in the MongoDB URI. The default value is admin.
-h, --help
Show help about the script options.

Generate a List of Missing Loaded MEF GTC Gaps

print_event_repository_loader_trace.py -u MtxAdmin -g
=======================================================================
print_event_repository_loader_trace.py started on 2019-10-18 16:53:58
=======================================================================
Sub-domain 1, nothing has been loaded.

print_event_repository_loader_trace.py -u MtxAdmin -g
=======================================================================
print_event_repository_loader_trace.py started on 2019-10-18 16:51:36
=======================================================================
Sub-domain 1
Events up to GTC 13075 are loaded.

print_event_repository_loader_trace.py -u MtxAdmin -g
=======================================================================
print_event_repository_loader_trace.py started on 2019-10-18 16:52:58
=======================================================================
Sub-domain 1
Events up to GTC 13075 are loaded, except the following (inclusive) GTC ranges are missing:
 - 1521 to 2020
 - 4771 to 5020
 - 8567 to 9435

Display Trace Statistics for Event Loader MEF Processing

print_event_repository_loader_trace.py --user MtxAdmin --host my-hostname-123
=======================================================================
print_event_repository_loader_trace.py started on 2016-03-17 16:39:48
=======================================================================
All MEFs reported on each event loader:
Report Time                State     Record   E:C:B   File
-------------------------  --------  -------  ------  -----------------------------
 - Event Loader 0 (sub-domain 1, pid 21647, version 5000.41322): started 2016-03-17T22:02:58+00:00 on "my-hostname-123", backlog 1, 
last connected 2016-03-17T22:04:26+00:00, has 14 MEF records:
2016-03-17T22:03:03+00:00  finished     6098  2:1:02  ./shared/event_store_meta/transaction_2_1_2_1422146808_16.mef.gz
2016-03-17T22:03:02+00:00  finished     6105  2:1:02  ./shared/event_store_meta/transaction_2_1_2_1422146788_15.mef.gz
2016-03-17T22:03:02+00:00  finished     6329  2:1:02  ./shared/event_store_meta/transaction_2_1_2_1422146765_14.mef.gz
2016-03-17T22:03:02+00:00  finished     6098  1:1:02  ./shared/event_store_meta/transaction_1_1_2_1422146717_11.mef.gz
2016-03-17T22:03:01+00:00  finished     6100  1:1:02  ./shared/event_store_meta/transaction_1_1_2_1422146696_10.mef.gz
2016-03-17T22:03:01+00:00  finished     6111  1:1:02  ./shared/event_store_meta/transaction_1_1_2_1422146676_9.mef.gz
2016-03-17T22:03:01+00:00  finished     6120  1:1:02  ./shared/event_store_meta/transaction_1_1_2_1422146656_8.mef.gz
2016-03-17T22:03:00+00:00  finished     5888  1:1:02  ./shared/event_store_meta/transaction_1_1_2_1422146637_7.mef.gz
2016-03-17T22:03:01+00:00  finished     9020  1:1:02  ./shared/event_store_meta/transaction_1_1_2_1422146635_6.mef.gz
2016-03-17T22:03:00+00:00  finished     9092  1:1:02  ./shared/event_store_meta/transaction_1_1_2_1422146633_5.mef.gz
2016-03-17T22:02:59+00:00  finished      246  1:1:02  ./shared/event_store_meta/transaction_1_1_2_1422146631_4.mef.gz
2016-03-17T22:02:59+00:00  finished        0  1:1:02  ./shared/event_store_meta/transaction_1_1_2_1422146628_3.mef.gz
2016-03-17T22:02:59+00:00  finished        0  1:1:02  ./shared/event_store_meta/transaction_1_1_2_1422146622_1.mef.gz
2016-03-17T22:02:59+00:00  finished        0  1:1:02  ./shared/event_store_meta/transaction_1_1_2_1422146626_2.mef.gz

Script Output

This section describes the fields displayed in the output of the print_event_repository_loader_trace.py script.

Output Field Description
Report Time The time for this MEF file record.
State The state of the MEF file. Possible values are started, finished, and failed.
Record The version of the MEF file record.
E:C:B The engine ID, cluster ID, and server ID of the MEF file.
File The MEF filename.