Reclaiming Disk Space Used by the Event Log Search Index

Overview

AuthControl Sentry writes its event log to the events table in the swivel_logs database on the appliance. By default this table carries a full-text index on the log message, which the Log Viewer uses to speed up text searches.

On busy appliances, or where logs are kept for a long time, this index can grow to take up a large share of the appliance disk. Removing it and switching Swivel to non-full-text searching frees that space.

Note

What changes: Without the full-text index, searches in the Log Viewer still work but may be slower. In practice, we haven’t noticed much of a performance degradation from disabling full-text indexing. Authentication, logging and all other functions are unaffected.

The searchType=NoFullText setting used below was introduced in AuthControl Sentry 4.2.4. See the Release Notes.

Tip

Consider upgrading to 4.3: Logging has been significantly enhanced in AuthControl Sentry 4.3 and is much more efficient. Rather than storing the full contents of every log message, the event log now stores message IDs, so it takes up far less space in the database.

Before You Start

Warning

Authentication outage: Swivel will not process authentications while Tomcat is stopped, so carry out this procedure in a maintenance window. If you have a primary and standby (HA pair), do one appliance at a time.

  • Take a snapshot or backup of the appliance first.

  • You need command-line access to the appliance (for example via PuTTY).

  • Optionally, run df -h now and note the free space, so you can compare it afterwards.

Procedure

  1. Check the name of the index

    mysql
    USE swivel_logs;
    SHOW INDEXES FROM events WHERE Index_type = 'FULLTEXT';
    EXIT;
    

    Make a note of the value in the Key_name column (normally messageIdx).

  2. Stop Swivel

    service tomcat stop
    
  3. Switch off full-text searching

    Edit /home/swivel/.swivel/conf/settings.properties and add this line at the end of the file:

    searchType=NoFullText
    

    This tells Swivel not to rely on the full-text index when searching the event log.

  4. Remove the index and compact the table

    mysql
    USE swivel_logs;
    ALTER TABLE events DROP INDEX messageIdx;
    OPTIMIZE TABLE events;
    EXIT;
    

    Use the index name from step 1 if it was different. Dropping the index removes it, and OPTIMIZE TABLE rebuilds the table so the space the index used can be reclaimed.

    Note

    These commands may take several minutes on a large event log. Please wait for the prompt to return before continuing.

  5. Start Swivel

    service tomcat start
    
  6. Check the result

    • Check the free space with df -h and compare it with the figure from before you started.

    • In the Swivel Administration Console, confirm that authentications are working and that the event log can be viewed in the Log Viewer.

If you have a standby appliance, repeat the procedure on it once the first appliance is confirmed working.

Need a Hand?

If you’d prefer us to carry this out with you on a remote session, or if the space isn’t freed afterwards, please contact Swivel Secure Support and we’ll be happy to help.