ivinco
[SOLVED] PMM Server Installation Error – Failed To Get PMM Server Parameters From Local Pmm-Agent: Pmm-Agent Is Not Connected To PMM Server.

[SOLVED] PMM Server Installation Error – Failed To Get PMM Server Parameters From Local Pmm-Agent: Pmm-Agent Is Not Connected To PMM Server.

Mykhailo LiepieshkoMykhailo Liepieshko··Updated

If pmm-admin add mysql (or any other pmm-admin add ...) fails with "pmm-agent is not connected to PMM Server", it means pmm-agent is running locally but was never registered against a pmm-server. The fix is to run pmm-admin config first to register the agent, then re-run the add command. This is a one-time setup step that’s easy to skip on a fresh install.

pmm-admin add mysql --query-source=perfschema --username=pmm --password=PASSWORD --service-name=MYSQL_NODE --host=127.0.0.1 --port=3306
Failed to get PMM Server parameters from local pmm-agent: pmm-agent is not connected to PMM Server.

This happens when you try to add a database to monitoring via PMM, but you haven’t registered the agent on any pmm-server yet. You just need to register your agent with the following command.

pmm-admin config --server-insecure-tls --server-url=https://admin:PMM_ADMIN_PASSWORD@XXX.XXX.XXX.XXX:443 XXX.XXX.XXX.XXX generic NODE_NAME

Checking local pmm-agent status...
pmm-agent is running.
Registering pmm-agent on PMM Server...
Registered.
Configuration file /usr/local/percona/pmm2/config/pmm-agent.yaml updated.
Reloading pmm-agent configuration...
Configuration reloaded.
Checking local pmm-agent status...
pmm-agent is running.

Now you can try to add your database to pmm-server again.

pmm-admin add mysql --query-source=perfschema --username=pmm --password=PASSWORD --service-name=MYSQL_NODE --host=127.0.0.1 --port=3306

MySQL Service added.
Service ID  : /service_id/1014a471-e6bb-4fe6-960c-12610a9050fd
Service name: MYSQL_NODE

Table statistics collection enabled (the limit is 1000, the actual table count is 103).

Need help running PMM at scale or troubleshooting database monitoring infrastructure? See our development services.

Frequently Asked Questions

What does "pmm-agent is not connected to PMM Server" mean?

It means pmm-agent is installed and running on the local machine, but it has no record of which pmm-server to talk to. The agent stores its server connection in /usr/local/percona/pmm2/config/pmm-agent.yaml, populated by pmm-admin config. Until that file points at a real server and the agent registers, every pmm-admin add ... command will fail at this step.

What is the difference between pmm-admin config and pmm-admin add?

pmm-admin config is a one-time setup command that registers pmm-agent with a pmm-server, creating the trust relationship and writing the server URL into the agent's config. pmm-admin add ... registers individual databases (MySQL, PostgreSQL, MongoDB, etc.) for monitoring. You must run config first; add only works against a registered agent.

Do I need --server-insecure-tls when running pmm-admin config?

Only if your pmm-server uses a self-signed certificate or no certificate at all. On a private network this is acceptable; for internet-facing setups, install a proper certificate on pmm-server and omit the flag. See the X509 troubleshooting post in the related reading section for the full certificate setup.

Can I monitor multiple databases from one pmm-agent?

Yes. After pmm-admin config registers the agent once, you can run pmm-admin add mysql, pmm-admin add postgresql, pmm-admin add mongodb, etc., each pointing at a different service on the same host. One agent can manage many monitored services as long as it has credentials and network access to each.