Skip to main content
Enhance your Jenkins security posture by tracking user activities—such as job configuration changes, system restarts, and build triggers—using the Audit Trail plugin. This guide walks you through installation, configuration, testing, and advanced logging options.

1. Install the Audit Trail Plugin

  1. From the Jenkins dashboard, go to Manage JenkinsManage Plugins.
  2. Select the Available tab and search for Audit Trail.
  3. Check the box next to Audit Trail and click Install without restart.
The image shows a webpage from the Jenkins plugins site, specifically detailing the "Audit Trail" plugin. It includes information on logger configuration, file logger, and syslog logger settings.

2. Configure the Audit Trail Plugin

  1. Navigate to Manage JenkinsConfigure System.
  2. Scroll down to the Audit Trail section.
  3. Under Logger, choose Log file (daily rotation).
  4. In Log file pattern, enter:
Use %g to rotate logs daily and prevent oversized files.
  1. Keep other settings at their defaults and click Save.
The image shows a Jenkins system configuration page focused on setting up an audit trail, including log file rotation settings.

3. Test Your Audit Trail Setup

3.1 Make a Job Configuration Change

  • From the dashboard, select an existing job (for example, monitor-jenkins).
  • Click Configure, tweak a build step or description, then click ApplySave.
  • Trigger a new build and wait for it to finish.

3.2 Inspect the Audit Logs

Ensure the Jenkins service account has write permissions to /var/log/jenkins.

3.3 Customize URL Patterns

  1. Return to Manage JenkinsConfigure System.
  2. In URL Patterns to Log, add:
  3. Click Save, perform another job action, then verify:

4. Additional Logging Options

Beyond file-based logs, Audit Trail supports:
The image shows a webpage from the Jenkins plugin site, detailing configuration options for Syslog, Console, and Elastic Search loggers. It includes fields for setting server details and mentions previous security warnings.

References and Further Reading

Watch Video