Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

InfluxDB Jenkins Pipeline Plugin: Target was null

I'm using InfluxDB Plugin to send metrics from my Jenkins build to influx. I want to use just the Jenkins Pipeline.

The version of the plugin is 1.10.2.

I add the following code to my Jenkinsfile as indicated in the documentation:

step([$class: 'InfluxDbPublisher',
        customData: null,
        customDataMap: null,
        customPrefix: null,
        target: 'http://ip:port,jenkins-db'])

When I execute the build I receive this error:

java.lang.RuntimeException: Target was null!
    at jenkinsci.plugins.influxdb.InfluxDbPublisher.perform(InfluxDbPublisher.java:186)
    at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:69)
    at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)

I see the configuration of the target was invalid but I don't understand why. Someone can help me?

like image 882
Cristiano Altmann Avatar asked Jan 21 '26 05:01

Cristiano Altmann


1 Answers

Try using the another syntax

step([$class: 'InfluxDbPublisher',
        customData: null,
        customDataMap: null,
        customPrefix: null,
        target: 'local influxDB'])
like image 143
Juan Enciso Avatar answered Jan 23 '26 20:01

Juan Enciso