Ask the Community
Groups
How to alter the retention period for external messages - Connect IT Community | Kaseya
<main> <article class="userContent"> <p><strong>QUESTION:</strong></p> <p>How do I alter the retention period for external messages/events?</p> <p> </p> <p><strong>RESOLUTION:</strong></p> <p>To reduce the amount of messages data retained, it is necessary to:</p> <p>1. Decrease the retention period in the script responsible for pruning the messages database table. Where TRAVERSE_HOME is the installation directory for Traverse, specify the retention period in days, within TRAVERSE_HOME\utils\purgeMessages.pl :</p> <p>my $ABSOLUTE_MIN_DAYS = 60; <br><br>2. Increase the frequency with which this script is run. This is necessary because the script also has maximum number of rows that it will delete in a single invokation. To change the frequency from daily to hourly, change the name of the file 'TRAVERSE_HOME\utils\tasks\01d_60_expire_messages.cmd' to '01h_60_expire_messages.cmd'. Note on Linux installations this file is '01d_60_expire_messages.sh'.</p> <p> </p> <p>Allow a week or so for the amount of message data retained to be reduced to the retention period, then revert the change made in step (2) above. Review 'TRAVERSE_HOME\logs\cronjobs.log' for output from each pass of the retention script.</p> <p>While the number of active rows of data in the messages table will be reduced, it may be necessary to perform a database repair in order to reclaim the disk space used by the file containing the messages table (TRAVERSE_HOME\database\mysql\aggregateddatadb\messages.MYD). This may be achieved by stopping all the Traverse components on the BVE, then from a <em>Windows</em> command prompt as an administrator:</p> <p>cd TRAVERSE_HOME<br>utils\db_repair.cmd</p> <p>Or from a <em>Linux</em> shell prompt with root access:</p> <p>cd TRAVERSE_HOME<br>utils/db_repair.sh</p> <p> </p> <p><strong>APPLIES TO:</strong></p> <p>All versions of Traverse </p> <p> </p> <p><strong>REFERENCE:</strong></p> <p>None</p> </article> </main>