Connect PMM agent with service account

Description:

I am currently testing the PMM software. I installed a local instance and connected several pmm agents using the default admin user and mysql exporter.
I connected the agents with this command:

pmm-admin config --server-url=https://admin:admin@<server_ip> --server-insecure-tls --force <db_ip> generic db-01

This worked fine. Later i disabled the admin account and switched to a personalized account. I also added a service Account for the agents with admin permissions but the agents cannot connect to the PMM instance with these service accounts.

Command:

pmm-admin config --server-url=https://<service_account_name>:<token>@<server_ip> --server-insecure-tls --force <db_ip> generic db-01

Result:

Checking local pmm-agent status...
pmm-agent is running.
Registering pmm-agent on PMM Server...
Failed to register pmm-agent on PMM Server: invalid username or password
Please check username and password.

When i switch back to the admin user it works fine again.

Aren’t these service accounts intended for use with agents? I do not want to connect the agents with personalized accounts. I can’t find an answer in the documentation. How am i supposed to connect the agents correctly?

Hello, currently PMM doesn’t support service accounts yet. We are working on it. You can use API Keys instead of Service Accounts for now.

When you use your personalized account to configure PMM Client, PMM Server generates API Key and sends it back to PMM Client to use it for future communication.

How can i connect the agent using a token? In the documentation i can only find user/password authentication.

Here i found out that you can use

https://api_key:<APIKEY>@host:port

as connection URI to authenticate.

Thank you very much for the help. Keep up the good work, your software is awesome!

Hey!

Just bumping this post to see if there is any progress made on the possibility to authenticate using service accounts.

Thanks in advance!

Hi @ThomasH, support of service accounts is planned for PMM 3

Hi @nurlan, thanks for your response!

Have a good day