-
Bug
-
Resolution: Not A Defect
-
Critical
-
Jenkins as a Servic3
Hello Team ,
I have configured InfluxDB plugin version 2.3 with a groovy pipeline.
I am using InfluxDbPublisher to create custom data map with fields and tags. Though the job build with message
"Custom data map found. Writing to InfluxDB...
Publishing data to target 'jenkins' (url='http://localhost:8086', database='apiresults')
Completed."
The custom measurement doesn't exist in the influx DB
My config step is as below
def testField = [:]
def testTag = [:]
def testDataMeasurementFields = [:]
def testDataMeasurementTags = [:]
testField['total'] = results.getTotalCount()
testField['passed'] = results.getPassCount()
testTag['infra'] = 'aws'
testTag['space'] = 'dev'
testDataMeasurementFields['apitest'] = testField
testDataMeasurementTags['apitest'] = testTag
step([$class: 'InfluxDbPublisher', selectedTarget: 'jenkins', customDataMap: testDataMeasurementFields,
customDataMapTags: testDataMeasurementTags, measurementName: 'apitest'])
karthik_hg You're specifying a measurementName in your InfluxDbPublisher step. Your custom measurementName is the same as your custom measurement "apitest".
From the documentation (https://plugins.jenkins.io/influxdb/)
So, you're defining your custom data with the name "apitest", but you're also overwriting the default "jenkins_data" with the same name and thus, our custom measurement is overwritten.
Try one of these solutions:
Any of those should resolve your issue.