Accessing Confluence audit information through the Database

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

This document gives an overview to find out audit information from the Database.

All content in this article was generated with a MySQL database. Some queries may need to be modified to suit different database types.

What's in the audit logs?

Audit logs store the audit information of the various events in Confluence. The main events/categories whose information is stored in Database are mentioned below.

  1. Apps
  2. Global Administration
  3. Import/Export
  4. Page Templates
  5. Pages
  6. Permissions
  7. Spaces
  8. Users and groups

Where is this information stored in the database?

Confluence stores its audit information in the AUDITRECORD table(Prior to v7.5)

  • The following SQL query lists which categories are individually recorded
SELECT distinct category from  AUDITRECORD
  • The result will be somewhat like below

  • To find out various events that are stored in Confluence Audit table, we can run the below query
SELECT distinct summary,category FROM AUDITRECORD
  • The result will be somewhat like below

How do I query for the information I need?

The AUDITRECORD table contains several columns with information that varies depending on the audit event (summary) and may require exploration to understand which columns should be included in the query. Knowing the possible entries for the summary and category columns allows for the formation of exploratory queries:

e.g.

SELECT * FROM AUDITRECORD WHERE category = 'Global Administration'

Sample queries

  • Let's say, you need to find audit information about License updation in Confluence. For that you can run the below query.
    • SELECT * from  AUDITRECORD WHERE category = 'Global Administration' 
      and Summary='Licence updated'
  • If you want to see the audit information related to Mail server creation event
    • SELECT * from  AUDITRECORD WHERE category = 'Global Administration' 
      and Summary='Mail server created'
  • Using combinations of summary and category columns, you can find a lot of useful audit information in the Database.

Last modified on Aug 17, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.