check_event_repository_configuration.py

The check_event_repository_configuration.py script displays Event Repository configuration information, such as the host information for each mongod in your replica set in which mongod is the primary and secondary, and a listing of the event database indexes.

Syntax

check_event_repository_configuration.py [--host serverName|ipAddress] [--port portNumber] [--user username] [--uri=full_MongoDB_uri] [--tenantRepository] [-h] [--eventDatabase TenantDatabaseName] [--authDatabase AuthenticationDatabaseName]

Options

The check_event_repository_configuration.py script has the following options:

--host=serverName|ipAddress
The MongoDB server to connect to. 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).
-u username, --user=username
Specify the MongoDB user to log in as.
--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.
--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.
--tenantRepository
(Optional) If this parameter is specified, the script skips checks whether the tenant repository is set up correctly.
-h, --help
Show help about the script options.

Display Event Repository Information When Connected to a mongod Server

This is example output is for a sharded MongoDB deployment:
check_event_repository_configuration.py --user MtxAdmin
=======================================================================
check_event_repository_configuration.py started on 2016-03-17 16:41:22
=======================================================================
The config server replica set is named 'MtxConfigReplSet':
 - mongod server on 192.168.1.1:27019 is PRIMARY
 - mongod server on 192.168.1.2:27019 is SECONDARY
 - mongod server on 192.168.1.3:27019 is SECONDARY

This database has 3 shards.

Shard 1 replica set is named 'MtxEventReplSet_1':
 - mongod server on 192.168.1.11:27018 is PRIMARY
 - mongod server on 192.168.1.12:27018 is SECONDARY
 - mongod server on 192.168.1.13:27018 is SECONDARY

Shard 2 replica set is named 'MtxEventReplSet_2':
 - mongod server on 192.168.1.21:27018 is PRIMARY
 - mongod server on 192.168.1.22:27018 is SECONDARY
 - mongod server on 192.168.1.23:27018 is SECONDARY

Shard 3 replica set is named 'MtxEventReplSet_3':
 - mongod server on 192.168.1.31:27018 is PRIMARY
 - mongod server on 192.168.1.32:27018 is SECONDARY
 - mongod server on 192.168.1.33:27018 is SECONDARY

Partitioning method: 2

Indexes:
Found index configuration:  MtxWalletOwnerId_1_EventTime_1 OrderedDict([(u'WalletOwnerId', 1), (u'EventTime', 1)])
Found index configuration:  MtxEventTime_1 OrderedDict([(u'EventTime', 1)])

Sharding is enabled for database 'MtxEventDatabase'.
Sharded collections are:
    'MtxEventDatabase.EventCollection20160316', key=OrderedDict([(u'WalletOwnerId', u'hashed')])
    'MtxEventDatabase.EventCollection20160331', key=OrderedDict([(u'WalletOwnerId', u'hashed')])