Home » Jenkins Metrics and Trends

Jenkins Metrics and Trends

by Online Tutorials Library

Jenkins – Metrics and Trends

Jenkins provides many plugins to present the metrics for builds which are carried out over a period of time. These metrics are useful to see the build and to understand how frequently they fail/pass over time.

Let’s see the “Build History Metrics Plugin”, this plugin is used to calculate the following metrics for all of the builds once installed:

  • MTTF (Metrics Time to Failure)
  • MTTR (Mean Time to Recovery)
  • Standard Deviation of Build Times

Step 1: First, go to Jenkins Dashboard and then click on Manage Jenkins.

Jenkins Metrics and Trends

Step 2: Then select Manage Plugins.

Jenkins Metrics and Trends

Step 3: On the Available tab, filter for the Build History Metrics plugin and select install without restart button.

Jenkins Metrics and Trends

Step 4: The following screen is showing the installation process and success of the installation of plugins.

Jenkins Metrics and Trends

After successful installation, click on Go back to the top page.

Jenkins Metrics and Trends

Step 5: Select any job and go to that job page. When you go to that job page, you will see a table with the calculated metrics. Metrics are displayed for the last 7 days, last 30 days and all time.

Jenkins Metrics and Trends

Trends in Jenkins

To see the overall Trends, Jenkins provides many plugins like Build-metrics plugin. This plugin is used to gather the information from within the builds and Jenkins and display them in a graphical format.

Step 1: Go to the Jenkins Dashboard.

Jenkins Metrics and Trends

Step 2: Select the Manage Plugins option.

Jenkins Metrics and Trends

Step 3: Go to the Available tab then search for “build-metrics” in the filter option and click on Install without restart button.

Jenkins Metrics and Trends

Step 4: The following screen is showing the installation process and success of the installation of plugins.

Jenkins Metrics and Trends

After successful installation of plugins, click on Go back to the top page link.

Jenkins Metrics and Trends

Step 5: Now go to the Jenkins Dashboard and click on Manage Jenkins.

Jenkins Metrics and Trends

Step 6: Scroll down, and now you will see an option called “Global Build Stats”. Click on this option.

Jenkins Metrics and Trends

Step 7: Click on the Initialize stats button. This button is used to gather all the existing records for builds which have already been carried out, and charts can be created based on these results. Once you click this button, you will see a text “data successful initialized“.

Jenkins Metrics and Trends

Step 8: Once the data has been initialized, it is the time to create a new chart. To create the new chart, click on “Create new chart configuration” link.

Jenkins Metrics and Trends

Step 9: When you enter that link, a pop up will appear. Enter all the information for the new chart details. Enter the following information which is mandatory:

  • Title – give any label, I have given “Result”
  • Chart Width – 600
  • Chart Height – 500
  • Chart time scale – Daily
  • Chart time length – 30 days

You can leave the rest of the information as it is. Once the information is entered, select the Create new chart button.

Jenkins Metrics and Trends

Here, it will display the trends of the build over time.

Jenkins Metrics and Trends

If you click on any section of the chart, it will show you a drill-down of the details of the job and their builds.

Jenkins Metrics and Trends


You may also like