# pmm-admin MongoDB port

**URL:** <https://forums.percona.com/t/pmm-admin-mongodb-port/5484>\
**Category:** PMM 1.x\
**Created:** [March 15, 2017, 4:50am UTC](https://forums.percona.com/t/pmm-admin-mongodb-port/5484 "2017-03-15T04:50:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bobho](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@bobho](https://forums.percona.com/u/bobho)\
**Post date:** [March 15, 2017, 4:50am UTC](https://forums.percona.com/t/pmm-admin-mongodb-port/5484/1 "2017-03-15T04:50:38Z")

</div>

Hi! Mykola :

Can I ask you one more question ?

It is about the “pmm-admin add mongodb” command !!  
You know the default port of MongoDB is 27017, what if I am using other ports like 37017 …

Can pmm-admin monitor the port ? I did see the option of “–service-port” on the online help page, but I can NOT sure of the usage, I had tried to use it, but fail … it says uint16 for the service port … what does it mean by that ?

---

<div class="post-metadata">

**Author:** ![Mykola](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mykola/32/30_2.png) [@Mykola](https://forums.percona.com/u/Mykola)\
**Post date:** [March 16, 2017, 1:57am UTC](https://forums.percona.com/t/pmm-admin-mongodb-port/5484/2 "2017-03-16T01:57:01Z")

</div>

can you show your command?

---

<div class="post-metadata">

**Author:** ![bobho](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@bobho](https://forums.percona.com/u/bobho)\
**Post date:** [March 16, 2017, 3:50am UTC](https://forums.percona.com/t/pmm-admin-mongodb-port/5484/3 "2017-03-16T03:50:29Z")

</div>

pmm-admin add mongodb --service-port 37017

---

<div class="post-metadata">

**Author:** ![bobho](https://avatars.discourse-cdn.com/v4/letter/b/4da419/32.png) [@bobho](https://forums.percona.com/u/bobho)\
**Post date:** [March 16, 2017, 4:33am UTC](https://forums.percona.com/t/pmm-admin-mongodb-port/5484/4 "2017-03-16T04:33:50Z")

</div>

Never mind …

I found out the correct command …  
​​​​​​​  
It should be : sudo pmm-admin add mongodb --uri :

---

<div class="post-metadata">

**Author:** ![Mykola](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/mykola/32/30_2.png) [@Mykola](https://forums.percona.com/u/Mykola)\
**Post date:** [March 16, 2017, 5:04am UTC](https://forums.percona.com/t/pmm-admin-mongodb-port/5484/5 "2017-03-16T05:04:46Z")

</div>

yes, you are right, is right option

pmm-admin starts [prometheus](https://prometheus.io) exporters like [node\_exporter](https://github.com/prometheus/node_exporter) or [mongodb\_exporter](https://github.com/dcu/mongodb_exporter) on 42000-42010 ports  
sometimes it is needed to specify exact port for exporter, in this case it is possible to use option.
