How to change local host IP to server IP

Hi,
I setup pmm- monitoring in my Environment under Mysql and MongoDB databases.
After setup the client like pmm client in servers I seen it is pointing to local host like 127.0.0.1, even node_exporter and MongoDB exporters also pointing to local host IP, I want change the local host to server IP or bind IP. Can you please help me to change.

netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:42000 0.0.0.0:* LISTEN 2267/mongodb_export
tcp 0 0 127.0.0.1:42001 0.0.0.0:* LISTEN 2308/node_exporter
tcp 0 0 127.0.0.1:42002 0.0.0.0:* LISTEN 2434/vmagent
tcp 0 0 127.0.0.1:40001 0.0.0.0:* LISTEN 21557/pmm-agent
tcp6 0 0 :::7777 :::* LISTEN 21557/pmm-agent

Even while configuring alert not getting the metrics
Value: [ var=‘A’ labels={agent_id=/agent_id/b#############, agent_type=pmm-agent, disabled=0, instance=pmm-server, job=pmm-managed, node_id=/node_id/#########, node_name=########, version=2.42.0} value=1 ]
Please help me on this.

Thank you.

Hi @ravi5358, you can use pmm-admin remove to remove the service, then re-add it with the correct IP. You will see both show up in PMM for a week or two until the “127.0.0.1” data is slowly purged.

Hi @matthewb, Thanks for your message.

Can you share me the full command like below
pmm-admin add mongodb --host IP of the server --username=### --password=##### --enable-all-collectors --environment=## --query-source=“profiler” --log-level=“warn” --debug --service-name=hostname-mongodb

Thank you
Ravi

Hi @matthewb,

How we can remove the PMM node_exporter, even I added DB server using pmm-admin add MongoDB --host server_ip. But it is not showing IP in below command
netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:42000 0.0.0.0:* LISTEN 22231/vmagent
tcp 0 0 127.0.0.1:42001 0.0.0.0:* LISTEN 22237/node_exporter
tcp 0 0 127.0.0.1:42002 0.0.0.0:* LISTEN 22249/mongodb_exporter

Those are local listeners for scraping the data. Those are not your client connections to mongo.