Accessing Confluence audit information through the Database
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.
- Please note that the audit table has changed from Confluence 7.5 and onwards. The audit table is now called AO_C77861_AUDIT_ENTITY. Please refer to the below document to know more about advanced auditing using DB queries in Confluence 7.5 and above.
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.
- Apps
- Global Administration
- Import/Export
- Page Templates
- Pages
- Permissions
- Spaces
- 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.