Search code examples
loggingjenkinstest-results

Best way to save Jenkins job-history/success-rate stats for 6+ months?


What would you all recommend as the best way to save Jenkins job-history/success-rate stats for 6+ months (for service-level agreement purposes)? Normally, Jenkins jobs are configured to save history for a certain amount of time but on our Jenkins server, which has hundreds of jobs, it may not be realistic to have all jobs not clean up on a regular basis.

SO, I am wondering if there is a typical way people might store light-weight stats on job success history?

My only ideas are:

  1. Run a CouchDB instance and do post-build curl statements to save stat information based on build variables?
  2. Have jobs write a .txt file into the workspace and always append to it (but that gets deleted when workspace is cleaned). Or a post-build .bash script step that writes to the file.
  3. Other ideas???

Solution

  • You can send execution data to InfluxDB and visualize it using Grafana.

    There is a plugin for that: InfluxDB Plugin

    That plugin supports sending at least the following metrics:

    • List item
    • Build health
    • Build number
    • Build status message
    • Build time
    • Job duration
    • Project name
    • Tests failed
    • Tests skipped
    • Tests total