# How to Install APM agent in Mongodb

**URL:** <https://discuss.elastic.co/t/how-to-install-apm-agent-in-mongodb/173567>\
**Category:** APM\
**Created:** [March 22, 2019, 11:16pm UTC](https://discuss.elastic.co/t/how-to-install-apm-agent-in-mongodb/173567 "2019-03-22T23:16:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samuel\_Lima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samuel_lima/32/41908_2.png) [@Samuel\_Lima](https://discuss.elastic.co/u/Samuel_Lima)\
**Post date:** [March 22, 2019, 11:16pm UTC](https://discuss.elastic.co/t/how-to-install-apm-agent-in-mongodb/173567/1 "2019-03-22T23:16:55Z")

</div>

How can I install an APM agent in Mongodb database?

What is the right APM agent to install in Mongodb?

Elasticsearch version: 6.6

APM Server version: 6.6

APM Agent language and version: I know Mongodb is writen in C++, Go, Javascript and Pythoh but don't know which APM aget to use and how to install it.

Is there anything special in your setup? No

Thanks

---

<div class="post-metadata">

**Author:** ![wa7son](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wa7son/32/21259_2.png) [@wa7son](https://discuss.elastic.co/u/wa7son)\
**Post date:** [March 23, 2019, 8:41am UTC](https://discuss.elastic.co/t/how-to-install-apm-agent-in-mongodb/173567/2 "2019-03-23T08:41:52Z")

</div>

Elastic APM does not instrument the MongoDB process directly, instead queries are traced from within the application they are made. So if you're running a Node.js application that is talking to your MongoDB database, you install the [Elastic APM Node.js Agent](https://www.elastic.co/guide/en/apm/agent/nodejs/current/index.html) into your Node.js app.

That being said, you should also consider collecting the metrics from MongoDB using the [MongoDB Metricbeat module](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-mongodb.html) and its logs using either [Filebeat](https://www.elastic.co/products/beats/filebeat) or [Logstash](https://www.elastic.co/products/logstash). But ingesting metrics and logs is not a replacement for APM data, it's just a compliment. Together Metrics, Logs, and APM data gives the full picture.

---

<div class="post-metadata">

**Author:** ![Samuel\_Lima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samuel_lima/32/41908_2.png) [@Samuel\_Lima](https://discuss.elastic.co/u/Samuel_Lima)\
**Post date:** [March 26, 2019, 3:12pm UTC](https://discuss.elastic.co/t/how-to-install-apm-agent-in-mongodb/173567/3 "2019-03-26T15:12:12Z")

</div>

wa7son,

I did exactly what you said, installing mongoDB Metribeat module and it worked.

Thank you !

---

<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:** [April 16, 2019, 11:12am UTC](https://discuss.elastic.co/t/how-to-install-apm-agent-in-mongodb/173567/4 "2019-04-16T11:12:30Z")

</div>

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