How to Change Settings for PMM Deployed via Docker

How to Change Settings for PMM Deployed via Docker

PREVIOUS POST
NEXT POST

When deployed through Docker Percona Monitoring and Management (PMM) uses environment variables for its configuration

For example, if you want to adjust metrics resolution you can pass -e METRICS_RESOLUTION=Ns  as  an option to the docker run  command:

You would think if you want to change the setting for existing installation you can just stop the container with docker stop  and when you want to start, passing new environment variable with docker start

Unfortunately, this is not going to work as docker start does not support changing environment variables, at least not at the time of writing. I assume the idea is to keep container immutable and if you want container with different properties—like environment variables—you should run a new container instead. Here’s how.

Stop and Rename the old container, just in case you want to go back

Refresh the container with the latest version

Do not miss this step!  When you destroy and recreate the container, all the updates you have done through PMM Web interface will be lost. What’s more, the software version will be reset to the one in the Docker image. Running an old PMM version with a data volume modified by a new PMM version may cause unpredictable results. This could include data loss.

Run the container with the new settings, for example changing METRICS_RESOLUTION

After you’re happy with your new container deployment you can remove the old container

That’s it! You should have running the latest PMM version with updated configuration settings.

PREVIOUS POST
NEXT POST

Share this post

Leave a Reply