Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

View InfluxDB on the plugin site for more information.

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:

Sends Jenkins build metrics into InfluxDB


The InfluxDB plugin allows to send various metrics to InfluxDB. It gets its data from other data available in Jenkins. For example, unit test results are gathered from the JUnit Plugin and Robot Framework results from the Robot Framework Plugin etc.

From version 1.13 onwards different plugins are listed as optional dependencies. In order to get rid of mandatory dependency errors, InfluxDB plugin must be re-installed.

Breaking changes in 2.0

From version 2.0 onwards "selectedTarget" is a mandatory parameter for pipelines and "target" parameter is no longer supported.

Configuration As Code: the configuration needs to be changed from `influxDbPublisher` to `influxDbGlobalConfig`.

Might cause issues when creating new targets in pipelines. The InfluxDbPublisher instance is now under jenkinsci.plugins.influxdb.InfluxDbStep.DescriptorImpl.

Supported Metrics

MeasurementDataRelated plugin
  • Build number
  • Project name
  • Project path

  • Build health
  • Build status message
  • Build time
  • Build Agent name
  • Job duration
  • Build result
  • Build result ordinal (0=Stable, 1=Unstable, 2=Failure, 3=Not built, 4=Aborted, 5=Unknown (for pipelines))
  • Successful build boolean
  • Last stable build number (or 0 if never)
  • Last successful build number (or 0 if never)
  • Tests failed (unit test results from JUnit Plugin)
  • Tests skipped (unit test results from JUnit Plugin)
  • Tests total (unit test results from JUnit Plugin)
  • Time in queue (from Metrics plugin)
  • Build scheduled time
  • Build start time
  • Build measured time

JUnit Plugin

Metrics Plugin

  • Package coverage %
  • Class coverage %
  • Line coverage %
  • Branch coverage %
  • Amount of packages
  • Amount of source files
  • Amount of classes
Cobertura Plugin
  • Test case name
  • Suite name
  • Duration
  • Amount of suites
  • Amount of passed tests
  • Amount of failed tests
  • Amount of total tests
  • Pass percentage of all tests
  • Amount of passed critical tests
  • Amount of failed critical tests
  • Total amount of critical tests
  • Pass percentage of critical tests
Robot Framework Plugin

Same as rf_results except:

  • Pass percentage of all tests
  • Pass percentage of critical tests
  • Test case name
Robot Framework Plugin

Same as rf_results except:

  • Pass percentage of all tests
  • Pass percentage of critical tests
  • Test case name
  • Suite name
  • Amount of suites

Extra data sent for this measurement:

  • Tag name
Robot Framework Plugin

Same as rf_results except:

  • Amount of suites
  • Amount of total tests
  • Pass percentage of critical tests
  • Total amount of critical tests
  • Pass percentage of all tests
Robot Framework Plugin
  • Package coverage %
  • Class coverage %
  • Line coverage %
  • Branch coverage %
  • Method coverage %
  • Instruction coverage %
JaCoCo Plugin
  • Total amount of errors
  • Percentage of errors
  • Average sample duration
  • Max/min sample duration
  • Size of samples
  • Total count of samples
  • 90 percentile
Performance Plugin


  • Amount of major/minor/critical/blocker/info issues
  • Lines of code
  • Build display name
  • Affected files
  • Commit authors
  • Commit messages
  • Commit count
  • Number of total/executed/not-executed/passed/failed/success/true-false tests
  • Best compile time test value/name
  • Worst compile time test value/name
  • Average compile time
  • Best performance test value/name
  • Worst performance test value/name
  • Average performance
  • Best execution time test value/name
  • Worst execution time test value/name
Perfpublisher Plugin
  • Metric name
  • Average value for metric
  • worst value for metric
  • best value for metric
Perfpublisher Plugin
  • Test name
  • Was test successful/executed
  • Test message
  • Compile time
  • Execution time
  • Performance
Perfpublisher Plugin
  • Test name
  • Metric name/value/relevancy
Perfpublisher Plugin


Create a database in InfluxDB and a user with access rights. In Jenkins, go to Manage Jenkins > Configure System > InfluxDB Targets and click "Add". Provide the database information. The "URL" parameter requires the whole URL of the InfluxDB database, including the http:// and the database port. Also, provide the retention policy you want the data to be stored in InfluxDB (e.g. 15m or 2d for 15 minutes or 2 days respectively). By default, the retention policy is infinite. Exceptions generated by the InfluxDB plugin can also be ignored by unselecting the "Expose Exceptions" checkbox.

In your job, select "Publish build data to InfluxDB" from the post-build actions.

Select the InfluxDB target you wish to publish the data to.


The plugin can be called either by using the influxDbPublisher() or step function. The influxDbPublisher format is only supported from version 1.21 onwards.

Pipeline syntax
influxDbPublisher(selectedTarget: 'myTarget'[, any other parameters you want to use])
step([$class: 'InfluxDbPublisher',
		selectedTarget: 'myTarget',
        customData: null,								// OPTIONAL
        customDataMap: null,							// OPTIONAL
        customPrefix: null,								// OPTIONAL
		jenkinsEnvParameterTag: 'KEY=' + env.PARAM,		// OPTIONAL, custom tags
		jenkinsEnvParameterField: 'KEY=' + env.PARAM,   // OPTIONAL, custom fields
		measurementName: 'myMeasurementName',           // OPTIONAL, custom measurement name. Replaces default "jenkins_data" and "jenkins_custom_data"
		replaceDashWithUnderscore: true,                // OPTIONAL, replace "-" with "_" for tag names. Default=false

customData and customDataMap are custom data generated during the build and not by the plugin.

customPrefix is added to the beginning of the measurements.

target takes the value of your description in your Global configuration.

NOTE! Up to release 1.10.3, pipeline was configured with the use the url and database.

step([$class: 'InfluxDbPublisher',
        customData: null,
        customDataMap: null,
        customPrefix: null,
        target: ',jenkins_db',

This form of configuration is not supported from version 1.11 onwards.

Pipelines don't have post-build actions, so the build result, build ordinal, and the build success boolean must be set manually. They will default to "?", 5, and false respectively unless set before calling the step. The boolean value is set according to the ordinal value and the ordinal value is fetched according to build result, so only the build result have to be set manually. Also, the build status will appear as "?" and the build duration might be a little off, because the build is not actually finished. If you want to get those pieces of information you need to configure the plugin separately on each job as a post-build action. The jobs can be run with, for example, the Build Pipeline Plugin to get data from all jobs to InfluxDB. Alternatively, you can insert the information in your build manually inside your Groovy script.

try {
    // Build things here
    if (currentBuild.result == null) {
        currentBuild.result = 'SUCCESS'	// sets the ordinal as 0 and boolean to true
} catch (err) {
    if (currentBuild.result == null) {
        currentBuild.result = 'FAILURE'	// sets the ordinal as 4 and boolean to false
    throw err
} finally {
    influxDbPublisher selectedTarget: 'myTarget'

From version 1.19 onwards, it's also possible to create and remove targets in pipelines.

Create a target in pipeline
// Get InfluxDB plugin descriptor (version < 2.0)
def influxdb = Jenkins.instance.getDescriptorByType(jenkinsci.plugins.influxdb.DescriptorImpl)

// version >= 2.0
def influxdb = Jenkins.instance.getDescriptorByType(jenkinsci.plugins.influxdb.InfluxDbStep.DescriptorImpl)

// Create target
def target = new jenkinsci.plugins.influxdb.models.Target()

// Set target details
// Mandatory fields
target.description = 'myNewTarget'
target.url = 'http://influxdburl:8086'
target.username = 'myUsername'

// version < 2.0
target.password = 'myPassword'

// version >= 2.0
hudson.util.Secret password = hudson.util.Secret.fromString('myPassword')
target.password = password

target.database = 'myDatabase'

// Optional fields
target.exposeExceptions = true // default = true
target.jobScheduledTimeAsPointsTimestamp = true // default = false
target.usingJenkinsProxy = true // default = false
target.retentionPolicy = '1d' // default = 'autogen'
// NEW in version 1.20.1
target.replaceDashWithUnderscore = true // default = false

// Add a target by using the created target object

// Write stuff to InfluxDB
// NOTE! If you have more targets configured in Jenkins, it's safer to add "selectedTarget" parameter to the InfluxDB step to ensure
// data is sent to the correct target.
// step([$class: 'InfluxDbPublisher', selectedTarget: 'myNewTarget'])
// OR (version >= 2.0)
// influxDbPublisher selectedTarget: 'myNewTarget'

// Remove a target by using the target description field value

Custom Data

You can create custom data in Jenkins pipelines. Custom data can be written to Influx like this:

def myDataMap = [:]
myDataMap['myKey'] = 'myValue'
step([$class: 'InfluxDbPublisher', selectedTarget: 'myTarget', customData: myDataMap])

This adds the key myKey with a value myValue to a measurement called jenkins_custom_data.

You can also create your own measurements with customDataMaps:

def myDataMap1 = [:]
def myDataMap2 = [:]
def myCustomDataMap = [:]
myDataMap1['myMap1Key1'] = 11 // first value of first map
myDataMap1['myMap1Key2'] = 12 // second value of first map
myDataMap2['myMap2Key1'] = 21 // first value of second map
myDataMap2['myMap2Key2'] = 22 // second value of second map
myCustomDataMap['series1'] = myDataMap1
myCustomDataMap['series2'] = myDataMap2
influxDbPublisher selectedTarget: 'myTarget', customDataMap: myCustomDataMap

This creates measurements series1 and series2 and adds the keys myMap1Key1 and myMap1Key2 with values 11 and 12 respectively to series1; and myMap2Key1 and myMap2Key2 with values 21 and 22 respectively to series2.

You can also set tags for your custom measurements with either customDataTags or customDataMapTags. Tags added with customDataTags are added to the measurement jenkins_custom_data. If you use customDataMapTags you must use the same map keys as the measurement names in customDataMap.

You can also set a custom measurement name for your jenkins_data and jenkins_custom_data measurements. To do this you must add

measurementName: 'measurementName_data'

inside your InfluxDbPublisher build step. This will change the name of your jenkins_data measurement into measurementName_data and jenkins_custom_data into custom_measurmentName_data.

Release catalogue

2.0.1 (29.8.2019)

2.0 (23.8.2019)

1.23 (28.6.2019)

1.22 (31.5.2019)

1.21 (16.5.2019)

1.20.4 (20.2.2019)

1.20.3 (5.2.2019)

1.20.2 (14.12.2018)

  • Fix support for SonarQube 7.4 and discontinue support for lower SonarQube versions (JENKINS-55009)
  • Fix calculating build time in custom data points (Pull Request 52)
  • Improved logging if plugin fails to connect to SonarQube (JENKINS-55032)

1.20.1 (29.11.2018)

1.20 (4.10.2018)

1.19 (5.9.2018)

1.18 (15.8.2018)

  • Adding test_name tag so that the 'group by' clause can be used for perfpublisher results (Pull Request 39)
  • Add a possibility to change measurement "jenkins_data" to a custom name in pipelines (Pull request 40)
  • Add additional log output for skipped point generators (Pull Request 41)
  • Set a consistent timestamp for all point generation (Pull Request 42)
  • Fix bug preventing setting target in pipeline step (Pull Request 43)

1.17 (29.6.2018)

  • Fixed an issue with Jenkins log being cluttered with warning messages (JENKINS-49105)
  • Changed minimum required Cobertura Plugin to get rid of warnings when creating a maven package
  • Enable the use of environment variables as fields or tags for jenkins_data (Pull Request 32)
  • Add build_scheduled_time, build_exec_time, and build_measured_time as fields in JenkinsPointGenerator (Pull Request 38)

1.16 (4.6.2018)

1.15 (11.5.2018)

1.14 (13.2.2018)

1.13.2 (23.1.2018)

1.13.1 (20.12.2017)

  • Fix for running pipelines without all optional plugins installed (Pull request 25)

1.13 (20.12.2017)

1.12.3 (30.6.2017)

1.12.2 (21.6.2017)

  • Changed consistency level from ALL to ANY (Issue 44840)
  • Changed default retention policy to "autogen" (Pull request 16)
  • Temporarily disabled SonarQube integration due to multiple errors

1.12.1 (26.5.2017)

  • Fixed Performance Plugin support for latest version (Issue 43539)

1.12 (15.5.2017)

1.11 (22.3.2017)

1.10.3 (10.2.2017)

  • rf_tag_name added to tag_point

1.10.2 (17.1.2017)

  • Fixed an issue with pipelines causing a NullPointerException for several metrics (JENKINS-41067)

1.10.1 (30.12.2016)

  • Changed performance measurement name from <unit test file> to performance_data

1.10 (23.12.2016)

  • Exceptions are now ignorable (Pull request 3)
  • New fields for jenkins_data: build_result, build_result_ordinal, build_successful, last_stable_build, last_successful_build(Pull request 10)

1.9 (8.11.2016)

  • Added support for custom data maps (Pull request 8)
  • Added support for custom data(Pull request 7)
  • Removed build_<job_name_with_dashes_changed_to_underscores> measurement as obsolete
  • Added support for Performance plugin (JENKINS-38298\)

1.8.1 (28.9.2016)

1.8 (13.9.2016)

1.7 (1.9.2016)

  • Added JaCoCo support
  • Retention Policy is now configurable in global settings
  • Metrics are now sent as a bulk, instead of sent separately (Pull request 2)

1.6 (10.8.2016)

  • Fixed issue with Cobertura report files on slave nodes were not found.

1.5 (5.8.2016)

  • Fixed issue with selected target not stored correctly in configuration

1.4 (4.8.2016)

  • Support for pipelines
  • Fixed issue with multiple targets with same url, but different database
  • Fixed issue with Cobertura reports in other than default location

1.3 (26.7.2016)

  • First release available from the update center.


  1. Unknown User (andreycizov)

    The v2.2 commit to Performance Plugin breaks the latest version of this plugin: https://github.com/jenkinsci/performance-plugin/commit/3e20466366c4f81a49d636c4f4cf9a513b0834c4

    1. Unknown User (orrc)

      Please use the issue tracker rather than wiki comments if you've found a problem.

  2. Unknown User (johninweb)

    Any snippet to add influx-db target (e.g: url,desc,user,pwd,db,rentention) on Jenkins configuration  using groovy script? 

    1. Unknown User (zougi)

      I believe this is not possible !?

      Usually there is a setter method in DescriptorImpl but there is none for this plugin

      I created issue  JENKINS-50962 - Getting issue details... STATUS

    2. Unknown User (aleksisimell)

      Unknown User (johninweb) Wiki updated as support for creating targets in groovy was added to plugin.

  3. Unknown User (tabeyti)

    Would be nice for the "Custom Prefix" field to allow token replacement.

  4. Unknown User (thodde390)

    I'm not able to see any of the metrics beyond "project_name" in my database. Are there more requirements that aren't listed? I am running Jenkins 2.89.2, InfluxDB v1.2, the latest version of the plugin, and the latest version of the JUnit plugin. I thought I would be able to see at least build_health, build_status, etc.

    1. Unknown User (aleksisimell)

      All requirements are listed in here. All mandatory dependencies installed when the plugin is installed and all metrics should be available immediately when criteria are met (i.e. the corresponding plugin is executed in a job).

      1. Unknown User (thodde390)

        It turns out my default retention period was set to 0s so it was never storing the data. Once I changed the retention period, everything worked perfectly. 

        1. Unknown User (sufyanharoon)

          Unknown User (thodde390)

          I am facing the same issue with my multi-branch pipeline. Only project name and build status are visible in the measurement in the db. Can you please let me know how did you set the retention period?

          1. Unknown User (thodde390)

            Unknown User (sufyanharoon) My retention policy in Jenkins is set to empty, so it is the the Jenkins default. I didn't see any retention period set in my influxdb.conf file, and it was commented out of my telegraf.conf file (not sure if this is relevant). 

  5. Unknown User (fchiorascu)


    Kindly request if is possible or you plan to +add an extra field in order to have the "Build Release not the existing Build Number" this means that if we tag a build with a version to be possible to collect that metric regarding that build version from Jenkins and to send in InfluxDB.

    Let me know what do you think.

    Kind Regards,

  6. Unknown User (hum3)

    Can we have the pipeline build result for influxdb in jenkins_data?

    We now have 0-4, and o got a "5" for "Build result ordinal" and a "?" for "Build result"

    1. Unknown User (aleksisimell)

      This is explained in the Wiki: 

      Pipelines don't have post-build actions, so the build result, build ordinal, and the build success boolean must be set manually. They will default to "?"5, and false respectively unless set before calling the step.

      You need to set the build result before calling the influx plugin in order to get the correct messages.

  7. Unknown User (fchiorascu)


    Kindly could you:

    1\. Explain the metrics that you add as new ones like: Project path, Build Agent name.

    2\. Any new metrics will be available like: Pipeline build result → 0 - 4.., build time and all the aspects.

    3\. The road map and if you plan to put there more metrics?

    Kind Regards,


    1. Unknown User (aleksisimell)


      Yes, explaining metrics is actually a good idea. I will add those to Wiki in due time.

      A road map is quite difficult to create, because almost all changes come from pull requests and I don't know what people will request.

      1. Unknown User (fchiorascu)

        Yes I could understand this aspect.

        But I have a kindly request for you, I've noticed that you detailed some aspects regarding pipeline: 0 - 4 build result in the previous comment.

        If possible kindly put a detailed Example how to configure best practices those build codes for a piepline, it will be great to have a relevant working example there.

        There was an old example from previous version but for me is not clear or relevant.


        Kind Regards,


  8. Unknown User (fchiorascu)



    For jenkins itself do you plan to have some metrics like for parallel tasks, resources, version, plugins, etc?

    Kindly do you plan other release and what will contain?

    You will do also something for pipeline like to have the same things like a normal job not the current format?


    Have a great day.

    Kind Regards,

    1. Unknown User (aleksisimell)


      What do you mean with "parallel tasks, resources, version, plugins, etc"?

      Yes, I am always planning to do another release, but the scope nor the schedule isn't set beforehand. I have my own change tracking file (based on merged pull requests and completed tickets in issue tracker). I can start doing a TBD next release scope listing on top of the release catalogue to help see what changes are coming.

      Yes, implementing a more intuitive pipeline syntax has been on my task list for quite some time already.

      1. Unknown User (fchiorascu)

        • Jenkins version (nice to have it I could say);
        • Jenkins: service/ process check/ PID;
        • Jenkins stuck Jobs and dependencies check;
        • Plugins from Jenkins: available, installed, total, etc as a number not who they are;
        • Jenkins resources used for example/ workload (CPU/ MEM/ etc) and also it will be nice to have: time that was idle Jenkins and time when he has activity for example.
        • Parallel tasks: when there a pipeline is running if possible to have more details or metrics not only build status from 0 to 4.
  9. Unknown User (fchiorascu)

    What is supposed to detail this metrics:

    • Build Agent name
    • Project path

    We didn't noticed any action for this metrics, is there a hidden configuration in order to trigger them?

    1. Unknown User (aleksisimell)

      Build agent name is – as the name suggests – the name of the build agent where the job was built. This means that if you have multiple agents (or nodes or slaves if you want to call them that) within your Jenkins instance, the agent name is sent to InfluxDB.

      Project path is the actual path to the build in Jenkins. Say you have a folder called "myFolder" and inside it a job called "myJob". In this case the project_path metric value would be "myFolder/myJob". If you have a highly structured Jenkins with lots of folders and possibly jobs with the same names, it is impossible to know which job does project_name metric mean.

  10. Unknown User (shadow00caster)

    Updated to Jenkins 2.121.3 and suddenly all of my projects are getting an error:

    [InfluxDB Plugin] Publishing data to: [url=, description=jenkins_data, username=admin, password=*****, database=jenkins_data]
    [InfluxDB Plugin] Failed to collect data. Ignoring Exception:java.lang.NullPointerException
    ERROR: Build step failed with exception
    	at jenkinsci.plugins.influxdb.generators.CustomDataPointGenerator.<init>(CustomDataPointGenerator.java:27)
    	at jenkinsci.plugins.influxdb.InfluxDbPublisher.perform(InfluxDbPublisher.java:341)
    	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
    	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
    	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
    	at hudson.model.Build$BuildExecution.cleanUp(Build.java:196)
    	at hudson.model.Run.execute(Run.java:1845)
    	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    	at hudson.model.ResourceController.execute(ResourceController.java:97)
    	at hudson.model.Executor.run(Executor.java:429)
    Build step 'Publish build data to InfluxDb target' marked build as failure
    1. Unknown User (aleksisimell)

      Please use the Issue tracker to report bugs.

  11. Unknown User (virtuosity)

    How to send metrics with changelog_data measurement? I don't receive such log output:

    "[InfluxDB Plugin] Git ChangeLog data found. Writing to InfluxDB..."

    I need to use some plugin (Git plugin or Git changelog plugin)? 

  12. Unknown User (pavel_shchetska)

    Hi folks, I have got the following behavior with the plugin (influxdb:1.19; jenkins:2.121.2). I have created new influxdb target in Manage Jenkins > Configure System and after that one became available for "Publish build data to InfluxDb target" in my job configuration. But when I have restarted aplication, Jenkins lost all InfluxDb targets in Manage Jenkins > Configure System.
    Has anybody got the same behavior?

    1. Unknown User (aleksisimell)

      Hi! Yes, this actually happened to me once or twice while I was testing new features before release. However, as I started looking into this in more detail, I couldn't reproduce the issue anymore no matter how many times I installed/upgraded the plugin. So, I thought it might've been caused by some caching-or-whatnot failure. Can you please report a bug to the Issue tracker?

      1. Unknown User (pavel_shchetska)

        Ticket was created JENKINS-53861 - Getting issue details... STATUS

  13. Unknown User (sufyanharoon)

    Hi everyone,

    Only data that is posted in my case is project_name and build_status and nothing else. No timestamp. Has anybody else also faced this issue? What could be the cause for this?

    1. Unknown User (virtuosity)

      hi, should be timestamp, check please using this query:

      select * from jenkins_data