# Trying to push OS details to APM server using python module

**URL:** <https://discuss.elastic.co/t/trying-to-push-os-details-to-apm-server-using-python-module/205374>\
**Category:** APM\
**Tags:** python\
**Created:** [October 27, 2019, 4:26am UTC](https://discuss.elastic.co/t/trying-to-push-os-details-to-apm-server-using-python-module/205374 "2019-10-27T04:26:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joseph\_John](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joseph_john/32/53907_2.png) [@Joseph\_John](https://discuss.elastic.co/u/Joseph_John)\
**Post date:** [October 27, 2019, 4:26am UTC](https://discuss.elastic.co/t/trying-to-push-os-details-to-apm-server-using-python-module/205374/1 "2019-10-27T04:26:18Z")

</div>

Hi All,  
I am trying to push my OS performance details to the APM server.  
I am trying to use python modules to do it.  
I am referring the docs  
[https://www.elastic.co/guide/en/apm/agent/python/5.x/instrumenting-custom-code.html](https://www.elastic.co/guide/en/apm/agent/python/5.x/instrumenting-custom-code.html)  
Me not an expert in python, but like to do the APM for the OS using python  
Is there any other docs on pushing the OS parameter to the APM server  
thanks  
Joseph John

**Kibana version** :  
7.3.1  
**Elasticsearch version** :  
7.3.1  
**APM Server version** :  
7.3.1  
**APM Agent language and version** :  
want to use elasticsearch python modules [pip install elastic-apm] to push my OS details to the APM server  
**Browser version** :  
Firefox 69  
**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:  
deb  
**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

---

<div class="post-metadata">

**Author:** ![beniwohli](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/beniwohli/32/21256_2.png) [@beniwohli](https://discuss.elastic.co/u/beniwohli)\
**Post date:** [October 27, 2019, 8:51am UTC](https://discuss.elastic.co/t/trying-to-push-os-details-to-apm-server-using-python-module/205374/2 "2019-10-27T08:51:53Z")

</div>

Hi @Joseph_John

can you expand a bit on what kind of OS performance data you want to collect?

For general system/OS level metrics, we recommend to use [Metricbeat](https://www.elastic.co/products/beats/metricbeat), as it is purpose-built for this use-case.

Cheers  
Beni

---

<div class="post-metadata">

**Author:** ![Joseph\_John](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joseph_john/32/53907_2.png) [@Joseph\_John](https://discuss.elastic.co/u/Joseph_John)\
**Post date:** [October 27, 2019, 9:29am UTC](https://discuss.elastic.co/t/trying-to-push-os-details-to-apm-server-using-python-module/205374/3 "2019-10-27T09:29:09Z")

</div>

Hi Beni,  
Thanks for the reply  
What I am aiming is to use apm python modules to collect the information of the OS (CPU activity, memory, and the dmesg messages to the APM.  
Why I want to try out it using python apm modules?. Because I want to understand how it works and how I can master python and later graduate in creating steps for APM for Python Applications which are not supported now. So with out using ‘MetricBeat’ I have to do this.  
This is more a part of studying and trying to understand and if I am good I can be usefull for making Python applications work with APM .  
I have checked the links

> [APM Python Agent Reference [6.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/python/current/index.html)  
> [Creating Custom Framework Integrations with the Elastic APM Python Agent | Elastic Blog](https://www.elastic.co/blog/creating-custom-framework-integrations-with-the-elastic-apm-python-agent)

With my limited python exposure, I am finding difficulty , so I thought I will start some thing simple ie write a small program to push OS details (linux) to the APM

So any help for me to get started is higly appreciated  
thanks  
Joseph John

---

<div class="post-metadata">

**Author:** ![basepi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/basepi/32/53056_2.png) [@basepi](https://discuss.elastic.co/u/basepi)\
**Post date:** [November 11, 2019, 11:13pm UTC](https://discuss.elastic.co/t/trying-to-push-os-details-to-apm-server-using-python-module/205374/4 "2019-11-11T23:13:12Z")

</div>

Hi @Joseph_John!

You certainly decided to dive into the deep end for mastering python, as what we do in the Python agent tends to be very "meta" and hard to grok. Good luck! 🙂

The biggest "problem" is that collecting metrics in our agent is fairly new functionality -- historically we have avoided duplicating functionality that [Metricbeat](https://www.elastic.co/products/beats/metricbeat) already does much better and more efficiently than we could. So far we only collect a few metrics, and don't have a good story in place for defining custom metrics. (Hopefully in the future it will be as easy as creating custom framework integrations, but today, that all revolves around transaction tracing, not system metrics)

I'd recommend you [open an issue](https://github.com/elastic/apm-agent-python/issues) so we can discuss more about the possibility of adding these types of custom metrics in the future.

---

<div class="post-metadata">

**Author:** ![Joseph\_John](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joseph_john/32/53907_2.png) [@Joseph\_John](https://discuss.elastic.co/u/Joseph_John)\
**Post date:** [November 12, 2019, 2:29am UTC](https://discuss.elastic.co/t/trying-to-push-os-details-to-apm-server-using-python-module/205374/5 "2019-11-12T02:29:08Z")

</div>

Thanks Beni, for the mail and the link to give feedback, me was not aware of the link.

Will be using it to give suggestions

---

<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:** [December 2, 2019, 10:29pm UTC](https://discuss.elastic.co/t/trying-to-push-os-details-to-apm-server-using-python-module/205374/6 "2019-12-02T22:29:08Z")

</div>

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