Skip to end of metadata
Go to start of metadata

Plugin Information

View Audit Trail on the plugin site for more information.

Keep a log of who performed particular Jenkins operations, such as configuring jobs.
This plugin adds an Audit Trail section in the main Jenkins configuration page. Here you can configure log location and settings (file size and number of rotating log files), and a URI pattern for requests to be logged. The default options select most actions with significant effect such as creating/configuring/deleting jobs and views or delete/save-forever/start a build. The log is written to disk as configured and recent entries can also be viewed in the Manage / System Log section.
Also see the JobConfigHistory Plugin for recording actual changes made to job configurations.



Configuration

File logger

Output audit logs in rolling files.

The file logger relies on java.util.logging.FileHandler and can use patterns to describe the log file location as documented here (%h, %g...).

Syslog logger

Send audit logs to a Syslog server.

Configuration screen

Advanced configuration screen

Console logger

Output audit logs in stdout or stderr. Primarily intended for debugging purpose.

Changelog

Version 2.1 (16-Sept-2014)
  • Add audit message with build start time, duration, node and cause 
Version 2.0 (23-April-2014)
  • Major refactoring to support multiple outputs
  • Add Syslog output
  • Add Console output
Version 1.8 (31-May-2013)
  • Fixed security vulnerability.
Version 1.7 (3-Aug-2011)
Version 1.6 (24-Feb-2011)
  • Rerelease 1.5 to properly set required Jenkins version.
Version 1.5 (15-Feb-2011)
  • Set a default value for log location.
  • Translation update (German)
Version 1.4 (21-Nov-2009)
  • For queue item URLs, add URL for that item's job in the log entry.
  • Update uses of deprecated APIs
Version 1.3 (3-Mar-2009)
  • Updated to work with Hudson 1.288 and higher. Use version 1.2 for older Hudson versions.
  • Fix so build triggers also appear in Manage / System Log section.
Version 1.2 (13-Feb-2009)
  • Add option to log how each build is triggered (on Hudson 1.283 or higher; older versions just say "Started").
  • Add some more URI patterns to log by default.
Version 1.1 (16-Jan-2009)
  • Minor log setup fixes.
Version 1.0 (15-Jan-2009)
  • Initial release.

13 Comments

  1. It would be great if the plug-in would just start off with a default location for the log file, e.g. HUDSON_HOME/audit_trail or something.  I don't imagine very many people would ever need to modify it, and it would eliminate the need to learn how j.u.l.FileHandler patters work (personally I had never used one before).

    1. I totally agree with that, default config should be what most users will want.

  2. Can I request that a disable/enable project is also logged via this plugin?

    1. Please use http://issues.jenkins-ci.org/ for bug reports and feature requests. You can already edit the settings for this plugin and make it log other things, if you can figure out the URL patterns for those things.

    2. I have used the Live HTTP headers plugin to get the correct URL pattern. Add the following pattern to the settings: enable and disable

  3. I find it odd that even at "all" this plugin doesn't track Shutdown Request or Shutdown Cancel.

    This seems to me to be an important omission.

    Frank

    1. Please use http://issues.jenkins-ci.org/ for bug reports and feature requests. You can already edit the settings for this plugin and make it log other things, if you can figure out the URL patterns for those things.

  4. How do I configure what actions are logged? Where do I find log levels documentation? Can I only log one action - e.g. when builds are run?

  5. Unknown User (ajaydwarkani@gmail.com)

    How can I create individual logs to see details on each log type such as I need a log just for deleted jobs, another log for added jobs etc.

    Appreciate your help,

    Ajay

  6. Does anyone know why the common Jenkins plugin information section times-out on this page?  It is working for other plug-in pages.

  7. May I specify environment variables in Log Location for File logger?

    For example:

    $JENKINS_HOME/audit.log

  8. Is it me, or is the file logging of this somewhat flakey? Doesn't create any files until I add a logger, then it starts to actually output to files, and continue to do so after it's removed.

    Also doesn't seem to create the required folder