JobConfigHistory Plugin Best Practices

Article ID:115000305271
2 minute readKnowledge base

Issue

Resolution

Job Configuration History plugin is a plugin designed to maintain the history of what has changed in the Jenkins job configuration and the system configuration. When a manual or programmatic save operation is performed in Jenkins, this plugin saves the history of what was changed (diff) and who made the changes (user).

Many customization possibilities will improve the performance of the Job Configuration History plugin.

The configuration can be edited at Manage Jenkins  System  Job Config History:

Configure System / Job Config History
  • Use different history directory than default - Setting this option to a new location is good if you would like to store the job configuration history in another location other than $JENKINS_HOME/config-history (like another mount or another drive). We strongly encourage users to set this to another mount/drive as the job config history plugin will increase the number of inodes for the JENKINS_HOME directory.

  • Max number of history entries to keep - We recommend keeping this number to a minimum (about 1000). If left blank then all entries will be kept.

  • Max number of days to keep history entries - We recommend the max number of days to be 30 days.

  • Max number of history entries to show per page - (For Job Config History version 2.18 or later) We recommend keeping this number to a minimum (about 20). This control the number of history records being loaded when browsing the config history of a job.

  • System configuration exclude file pattern - Some plugins can use configuration files to persist an internal state that refreshes often and of no interest to the end user. This can lead to a lot of unwanted change detections and disk I/O to persist the history. Please keep the default configuration which covers known open source plugins, while adding more patterns as required. For example, queue\.xml|nodeMonitors\.xml|UpdateCenter\.xml|global-build-stats|LockableResourcesManager\.xml|MilestoneStep\.xml|cloudbees-disk-usage-simple\.xml|OperationsCenterCredentialsProvider|XmlSlaveManifestImpl\.xml

    • OperationsCenterCredentialsProvider - cache of operations center credential lookups

    • XmlSlaveManifestImpl\.xml - operational data about shared agent that controller leased

  • Do not save duplicate history - We recommend having this option disabled (unchecked). When enabled, this option removes duplicate entries or entries where nothing changes, but this option is known to cause performance issues.

  • Save Maven module configuration changes - We recommend having this option disabled (unchecked). When enabled, and a maven project completes the job configuration is saved, which causes an increase in the amount of maven module configuration changes.

  • Show build badges - Set to Never to not overload the history widget.

  • Exclude users - If you want to exclude changes by a specific user. For example, excluding SYSTEM in an operations center - controller configuration.

References: