Comparing pmm-agent config to pmm-admin config

Hello.

I wandering to these commands.
What is the defferent of two commands?
And, Is there any difference in behavior when connecting to the monitoring server when entering each command?

[pmm-agent]

  1. pmm-agent setup --config-file=/usr/local/percona/pmm/config/pmm-agent.yaml --server-address=192.168.1.123 --server-insecure-tls --server-username=admin --server-password=admin --region=new --az=new

[pmm-admin]

  1. pmm-admin config --server-insecure-tls --server-url=https://admin:admin@192.168.1.123:443
  2. pmm-admin add mongodb --username admin --password admin --region=new --az=new

I read you’re guide (Register Client node - Percona Monitoring and Management) .
But when i ask my chatGPT, he say “The pmm-admin config command is a legacy command used in previous versions of PMM 1.x and is no longer needed in PMM 3. In PMM 3, agent configuration can be completed via pmm-agent setup, so pmm-admin config is no longer needed. pmm-admin is mainly used for administrative tasks such as adding services and checking status.”.

So, If i have a new server how can I register standardly way my mongodb server ?

Hi,
ChatGPT is wrong, we still use pmm-admin config and under the hood it calls pmm-agent setup command.