# Jenkins.agent fields are missing from Otel jenkins logs

**URL:** <https://discuss.elastic.co/t/jenkins-agent-fields-are-missing-from-otel-jenkins-logs/376190>\
**Category:** APM\
**Tags:** docker, open-telemetry\
**Created:** [March 20, 2025, 3:56pm UTC](https://discuss.elastic.co/t/jenkins-agent-fields-are-missing-from-otel-jenkins-logs/376190 "2025-03-20T15:56:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jack180](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jack180](https://discuss.elastic.co/u/jack180)\
**Post date:** [March 20, 2025, 3:56pm UTC](https://discuss.elastic.co/t/jenkins-agent-fields-are-missing-from-otel-jenkins-logs/376190/1 "2025-03-20T15:56:23Z")

</div>

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text 🙂

**Kibana version** : 8.16.4

**Elasticsearch version** :8.16.4

**APM Server version** :8.16.4

Jenkins otel plugin version: 3.1495.v64dcff5b\_7a\_6c

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: docker compose

Hello, I have setup Jenkins with the OpenTelemetry plugin and elasticsearch, kibana and apm-server using docker compose. I have successfully been able to send logs from Otel plug-in to elastic and configure elastic logs in jenkins open telemetry plug in (validate elasticsearch configuration passed)

I receive most logs but am missing jenkins.agent.total, online, offline etc as seen below:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/e/2ed8070e2cddd0971a0887a69132002415fd1e0f.png)

Loggers on jenkins are:

```auto
 - loggers: 
         - level: "FINER" 
             name: "io.jenkins.plugins.opentelemetry.job.log.OverallLog" 
         - level: "FINER" 
             name: "io.jenkins.plugins.opentelemetry.backend.elastic" 
         - level: "FINER" 
             name: "io.jenkins.plugins.opentelemetry.job.log.util" 
         - level: "FINE" 
             name: "io.jenkins.plugins.opentelemetry" 
         - level: "FINE" 
             name: "io.jenkins.plugins.opentelemetry.init" 
         - level: "FINE" 
             name: "io.jenkins.plugins.opentelemetry.job.log.OtelLogStorageFactory" 
         - level: "ALL" 
             name: "io.jenkins.plugins.opentelemetry.OpenTelemetrySdkProvider" 
         - level: "FINE" 
             name: "io.jenkins.plugins.opentelemetry.job.MonitoringPipelineListener" 
         - level: "FINE" 
             name: "io.jenkins.plugins.opentelemetry.job.MonitoringRunListener" 

```

There are no errors in any of the elastic stack logs or jenkins system logs and have some other jenkins fields populated:

```auto
jenkins.executor
jenkins.node
jenkins.plugins.updates
jenkins.queue

```

is there a setting or configuration i am missing to send jenkins.agent logs to elasticsearch?

**Errors in browser console (if relevant)**:

**Provide logs and/or server output (if relevant)**:

---

<div class="post-metadata">

**Author:** ![jack180](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jack180](https://discuss.elastic.co/u/jack180)\
**Post date:** [March 20, 2025, 4:06pm UTC](https://discuss.elastic.co/t/jenkins-agent-fields-are-missing-from-otel-jenkins-logs/376190/2 "2025-03-20T16:06:03Z")

</div>

I have found this error in apm server logs:  
`{"log.level":"error","@timestamp":"2025-03-20T16:00:35.672Z","message":"failed to index documents in '.ds-metrics-apm.app.jenkins-default-2025.03.14-000001' (document_parsing_exception): ","component":{"binary":"apm-server","dataset":"elastic_agent.apm_server","id":"apm-default","type":"apm"},"log":{"source":"apm-default"},"documents":7,"ecs.version":"1.6.0","log.origin":{"file.line":443,"file.name":"v2@v2.3.1/appender.go","function":"github.com/elastic/go-docappender/v2.(*Appender).flush"},"service.name":"apm-server","ecs.version":"1.6.0"}`  
but am unsure why it is happening, could this cause the issue?

---

<div class="post-metadata">

**Author:** ![jack180](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@jack180](https://discuss.elastic.co/u/jack180)\
**Post date:** [March 20, 2025, 4:17pm UTC](https://discuss.elastic.co/t/jenkins-agent-fields-are-missing-from-otel-jenkins-logs/376190/3 "2025-03-20T16:17:02Z")

</div>

have force merged indexes using curl command and above error no longer exists but still do not receive jenkins.agent logs

---

<div class="post-metadata">

**Author:** ![Ivan.fernandez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ivan.fernandez/32/84457_2.png) [@Ivan.fernandez](https://discuss.elastic.co/u/Ivan.fernandez)\
**Post date:** [March 25, 2025, 6:49am UTC](https://discuss.elastic.co/t/jenkins-agent-fields-are-missing-from-otel-jenkins-logs/376190/4 "2025-03-25T06:49:08Z")

</div>

The Jenkins OpenTelemetry plugin sends the Jenkins pipelines logs from the host that generates it. It means that when you run a pipeline some of it run on the Jenkins Controller, and other parts run in the Jenkins build Agents. So your Jenkins Controller and your Jenkins Build Agents must reach the Elastic Stack in order to send all the Jenkins pipeline logs.  
The demo give you a reference configuration it uses Docker compose [opentelemetry-plugin/demos at main · jenkinsci/opentelemetry-plugin · GitHub](https://github.com/jenkinsci/opentelemetry-plugin/tree/main/demos)
