Not the answer you need?
Register and ask your own question!

pmm-agent not autorun

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?

Best Answer

  • adivinhoadivinho Percona Percona Staff Role
    Accepted Answer

    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 "[email protected]" 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
    


Answers

  • sproninspronin Percona Staff Role

    Hello @yr4ik ,


    to clarify, when you say "PMM client installed in docker container with MariaDB 10.3 (ubuntu)", do you mean:

    1) You have MariaDB docker container

    2) You exec into this container and execute the "Install commands"

    ?

  • yr4ikyr4ik Current User Role Novice

    thanks for answer

    1) yes

    2) no. Container created with control panel web server

  • yr4ikyr4ik Current User Role Novice

    @adivinho thanks. Works

    Can you still tell me, where i can  find a good configuration for Mysql Mariadb (server + client)

  • adivinhoadivinho Percona Percona Staff Role

    Could describe issues that you faced with default configurations?

  • yr4ikyr4ik Current User Role Novice

    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?

  • adivinhoadivinho Percona Percona Staff Role

    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.

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.