# Does pmm-client need to have some ports open?

**URL:** <https://forums.percona.com/t/does-pmm-client-need-to-have-some-ports-open/8421>\
**Category:** PMM 2.x\
**Tags:** pmm\
**Created:** [December 20, 2020, 2:03pm UTC](https://forums.percona.com/t/does-pmm-client-need-to-have-some-ports-open/8421 "2020-12-20T14:03:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rnmkr](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@rnmkr](https://forums.percona.com/u/rnmkr)\
**Post date:** [December 20, 2020, 2:03pm UTC](https://forums.percona.com/t/does-pmm-client-need-to-have-some-ports-open/8421/1 "2020-12-20T14:03:07Z")

</div>

Hi. I followed pmm-client install [docs](https://www.percona.com/doc/percona-monitoring-and-management/2.x/setting-up/client/index.html)to setup pmm-client on my mysql server. Agent is connected and running.

pmm-admin statusshows following

```auto
PMM Client:
        Connected : true
        Time drift : -11.990242ms
        Latency : 693.653µs
        pmm-admin version: 2.12.0
        pmm-agent version: 2.12.0
Agents:
        /agent_id/46f2d482-bf8b-475e-8fdf-fcb5d44cf7e3 mysqld_exporter Running
        /agent_id/65a7f216-9cb7-4f34-88e1-d1289a67022b mysql_slowlog_agent Waiting
        /agent_id/cf5b678d-1033-4e39-82f1-166569cb8979 node_exporter Running
        /agent_id/dfaabf75-128d-4e15-92b8-d4881e3c3447 vmagent Running

```

However I don’t see any data in Grafana dashboards until I open ports of mysqld\_exporter and node\_exporter listening on pmm-client server. I afraid these port requirement is not documented anywhere.

Further investigating I found pmm-admin has **–metrics-mode=push** flag. I tried this flag without opening ports, but it still didn’t work. I thought this flag was supposed to enable push model instead of prometheus default scrape? or I maybe completely misunderstood this option.

So do I need to open the ports? If yes, let’s document it.

Also it looks like these ports are random?

---

<div class="post-metadata">

**Author:** ![artem\_gavrilov](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/artem_gavrilov/32/1453_2.png) [@artem\_gavrilov](https://forums.percona.com/u/artem_gavrilov)\
**Post date:** [December 20, 2020, 2:47pm UTC](https://forums.percona.com/t/does-pmm-client-need-to-have-some-ports-open/8421/2 "2020-12-20T14:47:15Z")

</div>

Hello @rnmkr

yes, metrics exporters ports should be opened and reachable by **pmm-server** , as it grabs metrics directly. [Here](https://www.percona.com/doc/percona-monitoring-and-management/2.x/details/architecture.html)you can find an explanation of how PMM works.

Also in PMM 2.12 **push** metrics model was introduced, it allows eliminate ports opening. However, if you want to switch metrics mode for an existing service, you should recreate it. There is no way to “update” service for now. You can read about it [here](https://www.percona.com/doc/percona-monitoring-and-management/2.x/details/victoria-metrics.html).

---

<div class="post-metadata">

**Author:** ![rnmkr](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@rnmkr](https://forums.percona.com/u/rnmkr)\
**Post date:** [December 20, 2020, 2:51pm UTC](https://forums.percona.com/t/does-pmm-client-need-to-have-some-ports-open/8421/3 "2020-12-20T14:51:25Z")

</div>

I see, I was experimenting with push model. Generally it works, it successfully registers node and services, but sometimes I don’t see metrics in Grafana dashboard. I see some gaps between time range. For now I will use pull model. Thanks for the answer @Artem
