This plugin integrates with the Opentelemetry Collector and Node exporter for monitoring of build agents.
It does this by deploying the Prometheus node exporter and Opentelemetry (Otel) Collector on job agents. The Otel Collector will scrape the metrics from node exporter.
On the job page a link will be displayed to a Grafana dashboard displaying the metrics of any build agents for a given build.
./mvnw clean package verify
).target/opentelemetry-agent-metrics.hpi
.hpi
file to your Jenkins build server and place it in the Jenkins plugin directory (usually /var/lib/jenkins/plugins
).jenkins
user.Follow https://www.jenkins.io/doc/book/installing/offline/ on how to install this plugin in an offline Jenkins instance.
In order for this plugin to work 2 executables are run on the agents.
These executables can either be:
opentelemetry-agent-metrics
subdirectory.It's not necessary to have executables for all OSs and architectures, only those required for your CI agents.
These executables are available for download on
Be sure to use the exact versions required by this plugin!
When running build agents on Linux amd64 and Mac Os arm64, then either
install on the PATH
of any mac agents: otelcol-contrib
(from otelcol-contrib_0.70.0_darwin_arm64
) and node_exporter
(from node_exporter-1.5.0.darwin-arm64
)
and on the PATH
of any Linux agents: otelcol-contrib
(from otelcol-contrib_0.70.0_linux_amd64
) and node_exporter
(from node_exporter-1.5.0.linux-amd64
)
setup a web server (or S3 bucket) serving:
and configure https://example.com/base-url
as the base URL in the plugin option.
Save the executables under the JENKINS_HOME:
$JENKINS_HOME/opentelemetry-agent-metrics/node_exporter-1.5.0.darwin-arm64
$JENKINS_HOME/opentelemetry-agent-metrics/node_exporter-1.5.0.linux-amd64
$JENKINS_HOME/opentelemetry-agent-metrics/otelcol-contrib_0.70.0_darwin_arm64
$JENKINS_HOME/opentelemetry-agent-metrics/otelcol-contrib_0.70.0_linux_amd64
When used in a pipeline involving multiple agents (eg. parallel stages), then onMonit
needs to be explicitly
used for each stage running on a different node!
When used in a pipeline involving multiple agents (eg. parallel stages), then onMonit
needs to be explicitly
used for each stage running on a different node!
Currently, it's only possible to use this plugin in Pipeline jobs and not in freestyle jobs.
The dashboard to which this plugin links should be able to display the metrics gathered from the agents.
Node Exporter Full was used as a basis to develop node-exporter-full-ci.json.
You can use this dashboard by importing the JSON file defining the dashboard linked above.
This dashboard additionally allows selecting by jobGroup, jobName, jobId and executor.
onMonit
step needs to be explicitly used for each stage running on a different node.The monitoring processes usually use 2MB in memory and 200 MB in disk size. CPU usage is minimal.