influxdata/telegraf

Add support to Jenkins build attributes as optional tags

Open

#16514 opened on Feb 15, 2025

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Go (9,892 stars) (4,161 forks)batch import
feature requesthelp wantedsize/s

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:

  • inProgress or building
  • displayName
  • description

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.

Contributor guide