Audit Log ========= Overview -------- The Audit Log is where Swivel maintains an activity log for users. This article describes how to configure auditing within Swivel and considerations to take when generating reports on audit data. It is possible to configure a schedule for the audit log tidy and the audit log length you wish to retain (in days). * For information on producing reports, see the :doc:`Reporting`. * For more information on querying the audit data, see the :doc:`DatabaseQueries`. Prerequisites ------------- Swivel stores Audit Log information from version 3.4 onwards in the Swivel database. Default Audit Log Settings -------------------------- .. note:: By default, the time period that audit logs are retained is **30 days**. This is important to note if you wish to generate reports on historical information. Audit Log Tidy -------------- The schedule for the audit log tidy task is located under **Server -> Jobs**. .. warning:: If you set this to "Never", the audit log will never be cleared. This means the audit table will grow continuously, which may become a problem in the long term, especially where disk space is limited. Alternatively, if you clear this regularly, you should note that any reports you run on this data will only go as far back as the specified audit log length in conjunction with when the audit logs were last tidied. For information on creating custom Audit log tidy jobs, see the :doc:`Schedule` guide. .. image:: /images/AuditLog/ServerJobs.png :alt: Audit Log Tidy Screen :align: center Audit Log Length ---------------- Configure the audit log length under **Policy -> General**. You can set this to be as long as you like, and audit records will be kept for that length of time. * **Default:** 30 days * **Maximum value:** 90 days .. image:: /images/AuditLog/AuditLength.png :alt: Audit Log Length Screen :align: center Audit Log Size -------------- The audit log size will depend upon the number of authentications and changes in the user information, as well as the length of data retention. It is possible to query the size of the audit log information depending upon the database type. Increasing the length of time that the audit log retains data will have an impact upon backup size. Audit Log Size - MariaDB ~~~~~~~~~~~~~~~~~~~~~~~~ To view the amount of audit data stored in the database (in MB), run the following query: .. code-block:: sql SELECT (data_length+index_length)/power(1024,2) tablesize_mb FROM information_schema.tables WHERE table_schema='pinsafe' AND table_name='PINSAFEM';