Add support to Jenkins build attributes as optional tags
#16.514 aberto em 15 de fev. de 2025
Métricas do repositório
- Stars
- (9.892 stars)
- Métricas de merge de PR
- (Mesclagem média 2d 12h) (136 fundiu PRs em 30d)
Description
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.