---
title: Jenkins
slug: jenkins
docTags: 
createdAt: 2024-03-04T05:37:59.275Z
---

Jenkins supports [OpenTelemetry](https://plugins.jenkins.io/opentelemetry/) and [Prometheus metrics](https://plugins.jenkins.io/prometheus/#plugin-content-jenkins-prometheus-metrics-plugin) plugins that help collect metrics and traces from Jenkins.&#x20;

## Installation

The plugins can be installed via two methods:&#x20;

1. Using the "**Plugin Manager**" (**`Manage Jenkins > Plugins > Available Plugins`** )in the Jenkins web UI.
2. Using the [Jenkins CLI](https://www.jenkins.io/doc/book/managing/plugins/#install-with-cli)&#x20;

Install both the [OpenTelemetry](https://plugins.jenkins.io/opentelemetry/) and [Prometheus metrics](https://plugins.jenkins.io/prometheus/#plugin-content-jenkins-prometheus-metrics-plugin) plugins.&#x20;

## Configuration

Once the plugins are installed, they need to be configured to send metrics to OpsVerse's **`ObserveNow`** stack. Navigate to **`Manage Jenkins > System`** and configure the plugins as following.

### OpenTelemetry

For OpenTelemetry, configure the `OTLP Endpoint` and set the `Exporter Timeout (ms)`  and `Metrics Exporter Interval (ms)` inside the Advanced tab as below.

:::CodeblockTabs
text

```none
OTLP Endpoint = http://otel-collector.devopsnow.svc.cluster.local:4318
Exporter Timeout (ms) = 30000
Metrics Exporter Interval (ms) = 60000
```
:::



![](https://api.archbee.com/api/optimize/xpy-ZuNXAextve6S5Tto2/BlTNJp7v7nSoF3OP-T7KI_screenshot-2024-03-04-at-121026-pm.png)

### Prometheus

The following `annotations` must be added in the Jenkins deployment file to enable scraping of metrics via Prometheus. For a [bitnami helm chart based Jenkins deployment ](https://github.com/bitnami/charts/tree/main/bitnami/jenkins/#installing-the-chart)add the following snippet to the `values.yaml` file of the Jenkins deployment.

```yaml
service: 
  annotations: {
    prometheus.io/scrape: "true",
    prometheus.io/port: "8080",
    prometheus.io/path: "/prometheus/"
  }
```

:::hint{type="success"}
Make sure that the `path` inside Prometheus system values is set to `prometheus`(this is the default value for path).
:::

## Visualization

Once the required telemetry is enabled, the `Jenkins Overview` dashboard that is pre-packaged with your `ObserveNow` stack can be used to visualize incoming traffic.

![Jenkins Dashboard](https://api.archbee.com/api/optimize/xpy-ZuNXAextve6S5Tto2/IJJpUnmaf7N0rU6EwEyWj_screen-shot-2024-03-26-at-50905-pm.png)

