# Pmm2 adding external source

**URL:** <https://forums.percona.com/t/pmm2-adding-external-source/7669>\
**Category:** PMM 2.x\
**Tags:** pmm\
**Created:** [June 9, 2020, 1:42am UTC](https://forums.percona.com/t/pmm2-adding-external-source/7669 "2020-06-09T01:42:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)\
**Post date:** [June 9, 2020, 1:42am UTC](https://forums.percona.com/t/pmm2-adding-external-source/7669/1 "2020-06-09T01:42:21Z")

</div>

Hello,  
After implementing “external source” feature, i tried it out with my RabbitMQ instance. I added it via “pmm-admin add external --service-name=“RabbitMQ Data” --listen-port=5672” and it added. Now how can i see it at Grafana? I could not find any doc about it, can you help please?

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [June 9, 2020, 2:44am UTC](https://forums.percona.com/t/pmm2-adding-external-source/7669/2 "2020-06-09T02:44:30Z")

</div>

Hi Ghan,  
You may check collected metrics in Prometheus and create your own dashboards.  
e.g.  
[https://172.17.0.2/prometheus/graph](https://172.17.0.2/prometheus/graph)

 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/e04528a030c47325fc522700a257d8ee710e74b5.png)

---

<div class="post-metadata">

**Author:** ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)\
**Post date:** [June 9, 2020, 6:55am UTC](https://forums.percona.com/t/pmm2-adding-external-source/7669/3 "2020-06-09T06:55:10Z")

</div>

![]() ![]() ![]() ![]()Thanks @adivinho but it did not work. Did i miss something?  
[https://ibb.co/7S3tYmw](https://ibb.co/7S3tYmw "Link: https://ibb.co/7S3tYmw")

---

<div class="post-metadata">

**Author:** ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)\
**Post date:** [June 17, 2020, 2:14am UTC](https://forums.percona.com/t/pmm2-adding-external-source/7669/4 "2020-06-17T02:14:01Z")

</div>

Hello all,  
when i checked via “pmm-admin list” command, my external exporters are at unknown status ??  
root@demo:/home/otonet# pmm-admin listService type&nbsp; Service name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Address and port&nbsp; Service IDExternal&nbsp; &nbsp; &nbsp; RabbitMQ Management&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /service\_id/2c0914c7-2bb3-46f9-be22-3b127ce2ffc6External&nbsp; &nbsp; &nbsp; RabbitMQ Data&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /service\_id/e91983a1-44eb-447d-b8a1-13b3ecc6930c  
Agent type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Status&nbsp; &nbsp; &nbsp;Agent ID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Service IDpmm\_agent&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Connected&nbsp; /agent\_id/4391d7c1-2d60-4687-b271-b41a3fd6f564node\_exporter&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Running&nbsp; &nbsp; /agent\_id/225451a0-8bbe-4985-bddc-535ef26f5088external-exporter&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Unknown&nbsp; &nbsp; /agent\_id/ade25f4b-9397-4ea4-ac7e-eaad2fc9d148&nbsp; /service\_id/e91983a1-44eb-447d-b8a1-13b3ecc6930cexternal-exporter&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Unknown&nbsp; &nbsp; /agent\_id/e66df7e3-b1eb-4b81-bb9d-9a3d2cf7247d&nbsp; /service\_id/2c0914c7-2bb3-46f9-be22-3b127ce2ffc6  
 ![]()

 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/586f7c4759c70ea12b2f1f8dd18c11f60d7df747.jpeg "Image: /uploads/percona1/original/1X/586f7c4759c70ea12b2f1f8dd18c11f60d7df747.jpeg")Also, states are down?  
Is there any way to listen systemd at linux (like old pmm lunix:metrics)? For example, it simple, i need to listen web ports (nginx). How can i do that?  
 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/1X/5ef20012c2fa3ef8d7b4b1ee10c6139c660e4b17.jpeg "Image: /uploads/percona1/original/1X/5ef20012c2fa3ef8d7b4b1ee10c6139c660e4b17.jpeg")

---

<div class="post-metadata">

**Author:** ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)\
**Post date:** [June 17, 2020, 2:29am UTC](https://forums.percona.com/t/pmm2-adding-external-source/7669/5 "2020-06-17T02:29:16Z")

</div>

I think informations are mixed.  
**What i need** : I need to monitor a service running inside linux. (It can be possible with tracking pid file or listening ports) Like postfix, nginx, ssh etc.  
  
**What external source feature provide** : I have to install external “exporter” such as nginx\_exporter or rabbitmq\_exporter of prometheus.  
If i am right, _how can i achive my goal?_

---

<div class="post-metadata">

**Author:** ![Vadim\_Yalovets](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/vadim_yalovets/32/43_2.png) [@Vadim\_Yalovets](https://forums.percona.com/u/Vadim_Yalovets)\
**Post date:** [June 17, 2020, 3:46am UTC](https://forums.percona.com/t/pmm2-adding-external-source/7669/6 "2020-06-17T03:46:22Z")

</div>

Hi Ghan,  
You can make it by using textfile-collector feature of the node\_exporter.  
So you should create a bash script that would&nbsp;tracking pid files or listening ports.  
  
Here is a [step-by-step instruction](https://www.percona.com/blog/2018/08/28/extend-metrics-for-percona-monitoring-and-management-without-modifying-code/ "Link: https://www.percona.com/blog/2018/08/28/extend-metrics-for-percona-monitoring-and-management-without-modifying-code/") for using this feature. It’s written for PMM1 so please use a different folder for placing files with metrics.  
Here are list of folder for PMM2:  
/usr/local/percona/pmm2/collectors/textfile-collector/high-resolution  
/usr/local/percona/pmm2/collectors/textfile-collector/low-resolution  
/usr/local/percona/pmm2/collectors/textfile-collector/medium-resolution

---

<div class="post-metadata">

**Author:** ![Cihan\_Tunali](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/cihan_tunali/32/4574_2.png) [@Cihan\_Tunali](https://forums.percona.com/u/Cihan_Tunali)\
**Post date:** [June 17, 2020, 3:50am UTC](https://forums.percona.com/t/pmm2-adding-external-source/7669/7 "2020-06-17T03:50:09Z")

</div>

Thx adivinho, i found another solution:  
I created a another node\_exporter service with --collector.systemd option. Then i created external source from pmm-admin on its port. Im able to get status each service of server. (Prometheus query : node\_systemd\_unit\_state{name=“nginx.service”,state=“active”})&nbsp;  
Thanks!
