Add support to Jenkins build attributes as optional tags
#16,514 建立於 2025年2月15日
描述
Use Case
I would like to enrich the existing jenkins_job measurement with optional tags about the job build.
There are a bunch of other attributes that may be useful for people to include in their telegraf configurations. In our case we rename the job build and description with useful information at the trigger stage of our build. Furthermore, having a real-time indicator of jobs that are still building would be super useful.
URL endpoint: https://<jenkinsHostname>/job/<jobName>/<buildNumber>/api/json
I think this is of course very opinionated, but it'd be useful to tag the datapoint with the content of these attributes, optionally:
inProgressorbuildingdisplayNamedescription
Expected behavior
As stated in my use case, extra tags per data point to better enrich our monitoring system
Actual behavior
Only a small subset of attributes are queried and reported by the jenkins input plugin.
Additional info
From an implementation perspective, Perhaps an array of hardcoded build attributes would make it less opinionated and more flexible without affecting the existing behaviour.