yr4ik
November 18, 2020, 12:18pm
1
Hello. PMM client installed in docker container with MariaDB 10.3 (ubuntu)
Install commands:
wget https://repo.percona.com/apt/percona-release_latest.generic_all.deb
sudo dpkg -i percona-release_latest.generic_all.deb
sudo apt-get update
sudo apt-get install pmm2-client
sudo pmm-agent setup --config-file="/usr/local/percona/pmm2/config/pmm-agent.yaml" --server-insecure-tls --server-username=admin --server-password=admin --server-address=172.17.0.2:443
But pmm-agent doesn’t start automatically. To run it, you need to manually call it every time:
pmm-agent --config-file=/usr/local/percona/pmm2/config/pmm-agent.yaml
How to make service pmm-agent start automatically?
Hello @yr4ik ,
to clarify, when you say “PMM client installed in docker container with MariaDB 10.3 (ubuntu)”, do you mean:
You have MariaDB docker container
You exec into this container and execute the “Install commands”
?
Hi,
If it’s required to start pmm-agent after container restarts you may modify used entrypoint script.
Here is an example for mariadb/server:latest
It was added pmm-agent command right before exec “$@” command
/usr/local/percona/pmm2/bin/pmm-agent --config-file=/usr/local/percona/pmm2/config/pmm-agent.yaml& Also it’s required to slightly change permissions for configuration file
docker exec -it mariadb chmod a+r /usr/local/percona/pmm2/config/pmm-agent.yaml
yr4ik
November 18, 2020, 5:09pm
5
@adivinho thanks. Works
Can you still tell me, where i can find a good configuration for Mysql Mariadb (server + client)
Could describe issues that you faced with default configurations?
yr4ik
November 19, 2020, 8:06am
7
the documentation for pmm v2 is not very detailed about tweaking. For example, how to disable unnecessary modules on the agent (postgresql proxysql, etc.) Maybe there are some settings for mysql?
Exporters are run only for monitored service types. So it will be run node_exporter and mysqld_exporter for your container.
The only possible tweak now is setting exporters scraping interval on PMM setting page.