Does pmm-client need to have some ports open?

Hi. I followed pmm-client install docs to setup pmm-client on my mysql server. Agent is connected and running.

pmm-admin statusshows following

PMM Client:
        Connected        : true
        Time drift       : -11.990242ms
        Latency          : 693.653µs
        pmm-admin version: 2.12.0
        pmm-agent version: 2.12.0
        /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?

Hello @rnmkr

yes, metrics exporters ports should be opened and reachable by pmm-server, as it grabs metrics directly. Here 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.

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