Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adding custom data maps to InfluxDB from pipelines #8

Merged
merged 5 commits into from
Nov 8, 2016

Conversation

nocono
Copy link
Contributor

@nocono nocono commented Nov 6, 2016

extending what has been provided with #7.

With the CustomDataMapPointGenerator data generated in a pipeline can easily be written into Influx.
The measurement name is be defined as key of the respective map which itself contains another map with key-value pairs containing measurement data.

Example (also available as comment in InfluxDbPublisher):

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
step([$class: 'InfluxDbPublisher', target: myTarget, customPrefix: 'myPrefix', customDataMap: myCustomDataMap])

This pull request also provides unit tests for both customDataPointGenerator as well as customDataMapPointGenerator.

@asimell asimell merged commit e7ebb02 into jenkinsci:master Nov 8, 2016
@nocono nocono deleted the customDataMapGenerator branch November 10, 2016 20:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants