Updating time-to-live index for persistent chat

The time-to-live (TTL) setting in the sametime.ini defines how long the chat history is stored in the database. The default value is 90 days. Administrators can modify the value based on the organization's preferred setting.

Before you begin

The TTL index in MongoDB must be rebuilt. For more information, refer to Manage Indexes in the MongoDB documentation.

About this task

To update the TTL settings used by the Sametime Community server involves modifying the following files.
  • chatlogging.ini
  • sametime.ini

Procedure

  1. Stop the Sametime Community server. For more information, refer to Starting and stopping servers.
  2. In chatlogging.ini, update the CL_MONGO_HISTORY_TTL parameter to the preferred setting. The minimum value is 1.
  3. In sametime.ini, add the following parameters to the stconvomap section. The minimum values are 1 and 0 respectively. In the examples below, the value is set to 3 days and 5 hours.
    CONVOMAP_MAX_DAYS = 3
    CONVOMAP_MAX_HOURS = 5
    Note: The MongoDB index does not need to be dropped again for this change.
  4. In the Mongo shell, run the following commands.
    use chatlogging
    db.EVENTS.getIndexes()
    db.EVENTS.dropIndex( "TimeStamp_1") 
    The db.EVENTS.dropIndex command defines the name of the index to drop. The value is TimeStamp_1.
  5. Start the Sametime Community server. A new TTL index with the new value is created.
  6. Run the following command to confirm that the value for TimeStamp_1 has been updated.
    db.EVENTS.getIndexes()