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?
Try using the another syntax
step([$class: 'InfluxDbPublisher',
customData: null,
customDataMap: null,
customPrefix: null,
target: 'local influxDB'])