# Sending jenkins metrics to elastic APM

**URL:** <https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727>\
**Category:** APM\
**Tags:** open-telemetry\
**Created:** [October 17, 2022, 5:42am UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727 "2022-10-17T05:42:14Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neelam\_Zanvar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neelam_zanvar/32/103116_2.png) [@Neelam\_Zanvar](https://discuss.elastic.co/u/Neelam_Zanvar)\
**Post date:** [October 17, 2022, 5:42am UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727/1 "2022-10-17T05:42:14Z")

</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 🙂

TIP 1: select at least one tag that further categorizes your topic. For example `server` for APM Server related questions, `java` for questions regarding the Elastic APM Java agent, or `ui` for questions about the APM App within Kibana.

TIP 2: Check out the [troubleshooting guide](https://www.elastic.co/guide/en/apm/get-started/current/troubleshooting.html) first. Not only will it help you to resolve common problems faster but it also explains in more detail which information we need before we can properly help you.

**Kibana version** : 8.4.2

**Elasticsearch version** : 8.4.2

**APM Server version** : 8.4.2

**APM Agent language and version** : otel plugin in jenkins 2.9.2  
**Browser version** : chrome Version 105.0.5195.127

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:yum  
**Fresh install or upgraded from other version?** fresh

**Is there anything special in your setup?** For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc. NO

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:  
I've setup otel plugin on jenkins to send metrics to apm. when it navigates to the apm page to visualize the metrics few metrics show blank saying the fields are missing in the index

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/5/55b869a9b882349a81fc27b7e068812d314a18db.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/7/b76b8759dd50ce599a8bcd9db35d2f80146c6935.png)

on the jenkins plugin page i am getting . Even after giving correct credentials to access elasticsearch. WHile mentioning the url of elasticsearch it has asked for read on permission on logs-apm-app index. how can i do that?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/8/78e150273917807ff53a1c9b14c46ca45300a009.png)

in the logs i'm getting this. I've setup elasticsearch credentials in apm.yml file

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d6baaa2e4632b6b1285f351c6b6646df1b13e635.png)

**Steps to reproduce** :

1. install apm on elk machine and added credentials to connect to elasticsearch.
2. install otel plugin on jenkins and configure it to connect to apm
3. import jenkins dashboards to kibana

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

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

---

<div class="post-metadata">

**Author:** ![aninfinite](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aninfinite/32/112156_2.png) [@aninfinite](https://discuss.elastic.co/u/aninfinite)\
**Post date:** [October 17, 2022, 12:53pm UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727/2 "2022-10-17T12:53:45Z")

</div>

[Jenkins overview shows blank · Issue #535 · jenkinsci/opentelemetry-plugin · GitHub](https://github.com/jenkinsci/opentelemetry-plugin/issues/535) contains the same request and further comments regarding some troubleshooting.  
I was not able to reproduce the error locally using the same versions (Elastic stack, Jenkins, OpenTelemetry plugin).

---

<div class="post-metadata">

**Author:** ![Neelam\_Zanvar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neelam_zanvar/32/103116_2.png) [@Neelam\_Zanvar](https://discuss.elastic.co/u/Neelam_Zanvar)\
**Post date:** [October 18, 2022, 6:11am UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727/3 "2022-10-18T06:11:20Z")

</div>

I need to give read access to elastic(custom) user to logs-apm.app index template. i am missing something on the apm server side i guess.  
When i click on elastic observability on jenkins and it directs me to jenkins overview dashboard getting this in the logs of apm server

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/2/124e7b2c986cbff0b399605cc67115a6cad092b0.png)  
on apm server side in the config file i have just added  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/f/5faacba33b82109d34dd57256e339f926758bc4f.png)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/5/95dca9a9b28564fbfe67cbb8100f97647fafa90d.png)

Even on jenkins opentelemetry plugin side

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/f/6f870777d788a839b6a46c82427d50c93f9c87e7.png)  
Please help. i am getting all the data except agent data, queue data and git data. i followed the ticked u shared but didnt get any help

---

<div class="post-metadata">

**Author:** ![aninfinite](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aninfinite/32/112156_2.png) [@aninfinite](https://discuss.elastic.co/u/aninfinite)\
**Post date:** [October 18, 2022, 8:14am UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727/4 "2022-10-18T08:14:44Z")

</div>

Can you verify if the elastic user can access your Elasticsearch from the Jenkins CI Controller?

For instance, if you access to your Jenkins Controller by ssh, you could use `curl`:

> curl -XGET -u elastic:PASSSWORD [https://devops.minutuscloud.com/elastic](https://devops.minutuscloud.com/elastic)

Please replace PASSWORD with the one you filled in the Elasticsearch credentials in Jenkins

The above might help you to know whether the user exists in Elasticsearch and it's accessible from the Jenkins controller.

---

<div class="post-metadata">

**Author:** ![Neelam\_Zanvar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neelam_zanvar/32/103116_2.png) [@Neelam\_Zanvar](https://discuss.elastic.co/u/Neelam_Zanvar)\
**Post date:** [October 18, 2022, 11:59am UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727/5 "2022-10-18T11:59:32Z")

</div>

> [@aninfinite](#):
>
> curl -XGET -u elastic:PASSSWORD [https://devops.minutuscloud.com/elastic](https://devops.minutuscloud.com/elastic)

Hello, thank you for your response and time. I tried to access the elastic url(which is behind reverse proxy) as you said. getting nginx error moved permanently. so i changed elastic url to the actual url ignoring reverse proxy. i am able to access it using curl from jenkins controller. and now the error changes to

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

---

<div class="post-metadata">

**Author:** ![Neelam\_Zanvar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neelam_zanvar/32/103116_2.png) [@Neelam\_Zanvar](https://discuss.elastic.co/u/Neelam_Zanvar)\
**Post date:** [October 18, 2022, 12:51pm UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727/6 "2022-10-18T12:51:50Z")

</div>

The error from plugin is gone. but in logs still i am getting this

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/c/4c17df6f9f5f2b188b8efbb376e61acb411a9982.png)  
am i missing some config in apm server?

---

<div class="post-metadata">

**Author:** ![aninfinite](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aninfinite/32/112156_2.png) [@aninfinite](https://discuss.elastic.co/u/aninfinite)\
**Post date:** [October 18, 2022, 1:50pm UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727/7 "2022-10-18T13:50:35Z")

</div>

Do you see any traces in Kibana for the Jobs running in Jenkins? Do you see any logs for those jobs in Kibana? What do you mean with `in logs still I am getting this`?

On the other hand, one way to start with and get familiar with the Jenkins OpenTelemetry plugin could be by using the demos in [opentelemetry-plugin/demos at master · jenkinsci/opentelemetry-plugin · GitHub](https://github.com/jenkinsci/opentelemetry-plugin/tree/master/demos) and see if the same settings work in that particular environment. Then you could change the Jenkins configuration to use your elastic stack, so you can discard if anything is misconfigured

---

<div class="post-metadata">

**Author:** ![Neelam\_Zanvar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neelam_zanvar/32/103116_2.png) [@Neelam\_Zanvar](https://discuss.elastic.co/u/Neelam_Zanvar)\
**Post date:** [October 19, 2022, 5:07am UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727/8 "2022-10-19T05:07:09Z")

</div>

In logs in am getting this means I have attached a screenshot of log errors, that I am getting on APM server machine when i click on elastic observability on jenkins

---

<div class="post-metadata">

**Author:** ![Neelam\_Zanvar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neelam_zanvar/32/103116_2.png) [@Neelam\_Zanvar](https://discuss.elastic.co/u/Neelam_Zanvar)\
**Post date:** [October 20, 2022, 4:11am UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727/9 "2022-10-20T04:11:29Z")

</div>

yes i can see the traces of jobs running in kibana

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/4/a/4a0c6cc116b090b724dd81d6acbf21bb22dc2236.png)

---

<div class="post-metadata">

**Author:** ![Neelam\_Zanvar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/neelam_zanvar/32/103116_2.png) [@Neelam\_Zanvar](https://discuss.elastic.co/u/Neelam_Zanvar)\
**Post date:** [October 31, 2022, 7:14am UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727/10 "2022-10-31T07:14:58Z")

</div>

Hi i am still stuck with this issue. on apm logs i am getting  
failed to index event (illegal\_argument\_exception): can't merge a non object mapping [system.cpu.load] with an object mapping","service.name":"apm-server"

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/6/06228d45bf1131e8db27e93c5ac6e2e2ffaae53d.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 21, 2022, 3:15am UTC](https://discuss.elastic.co/t/sending-jenkins-metrics-to-elastic-apm/316727/11 "2022-11-21T03:15:23Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
