How enable the METRICS_RESOLUTION=5s without recreate the container
we run the command # docker run -e METRICS_RESOLUTION=5s
“docker run” requires at least 1 argument.
See ‘docker run --help’.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG…]
Run a command in a new container
Please advice how to fix the issue
Hi Vishwanath Kristappa
We don’t currently support a way to modify METRICS_RESOLUTION for a running container. You need to stop the container, and start it again with the desired option.
Hi
1st taken backup of the pmm-server backup
docker stop pmm-server
docker rename pmm-server pmm-server-backup
then run the command create new
docker create
-e METRICS_MEMORY=25165824 \
-e METRICS_RETENTION=192h \
-e metrics_resolution=5s \
-v /opt/prometheus/data
-v /opt/consul-data
-v /var/lib/mysql
-v /var/lib/grafana
–name pmm-data
percona/pmm-server:1.5.3 /bin/true
but all monitoring host missing
then roll back
docker rename pmm-server-backup pmm-server
docker start pmm-server
now we able to see all hosts
any tips to fix the issue using metrics_resolution=5s \ pls share the steps
Hi
Please share the tips to fix the metrics_resolution=5s
IMP
March 19, 2019, 5:55am
5
Hey,
what you need to do, is to recreate pmm-server container, not pmm-data. pmm-data container, which contains all the data, should be immutable.
Please do the following.
0. Take a backup of pmm-data.
Stop pmm-server container
# docker stop pmm-server
Rename it, because it’s better to be safe, than sorry:
# docker rename pmm-server pmm-server-old
Create a new pmm-server container linked with pmm-data
# docker run -d \
-p 80:80 \
--volumes-from pmm-data \
--name pmm-server \
--restart always \
-e METRICS_MEMORY=25165824 \
-e METRICS_RETENTION=192h \
-e metrics_resolution=5s \
percona/pmm-server:1.5.3
Double check if everything’s working as expected. If so, delete the pmm-server-old container. Note, that you are using rather an old version of PMM. You should consider upgrading it to the recent, which for now is 1.17.1.
Best, IMP