# How to enable the METRICS\_RESOLUTION=5s

**URL:** <https://forums.percona.com/t/how-to-enable-the-metrics-resolution-5s/6874>\
**Category:** PMM 1.x\
**Created:** [February 28, 2019, 7:53am UTC](https://forums.percona.com/t/how-to-enable-the-metrics-resolution-5s/6874 "2019-02-28T07:53:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishwanath\_Kristappa](https://avatars.discourse-cdn.com/v4/letter/v/90ced4/32.png) [@Vishwanath\_Kristappa](https://forums.percona.com/u/Vishwanath_Kristappa)\
**Post date:** [February 28, 2019, 7:53am UTC](https://forums.percona.com/t/how-to-enable-the-metrics-resolution-5s/6874/1 "2019-02-28T07:53:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Michael\_Coburn](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/michael_coburn/32/18_2.png) [@Michael\_Coburn](https://forums.percona.com/u/Michael_Coburn)\
**Post date:** [March 1, 2019, 12:27pm UTC](https://forums.percona.com/t/how-to-enable-the-metrics-resolution-5s/6874/2 "2019-03-01T12:27:20Z")

</div>

Hi [Vishwanath Kristappa](https://percona.vanillacommunities.com/profile/x/x/35228)

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.

---

<div class="post-metadata">

**Author:** ![Vishwanath\_Kristappa](https://avatars.discourse-cdn.com/v4/letter/v/90ced4/32.png) [@Vishwanath\_Kristappa](https://forums.percona.com/u/Vishwanath_Kristappa)\
**Post date:** [March 15, 2019, 10:17am UTC](https://forums.percona.com/t/how-to-enable-the-metrics-resolution-5s/6874/3 "2019-03-15T10:17:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Vishwanath\_Kristappa](https://avatars.discourse-cdn.com/v4/letter/v/90ced4/32.png) [@Vishwanath\_Kristappa](https://forums.percona.com/u/Vishwanath_Kristappa)\
**Post date:** [March 19, 2019, 5:34am UTC](https://forums.percona.com/t/how-to-enable-the-metrics-resolution-5s/6874/4 "2019-03-19T05:34:45Z")

</div>

Hi  
Please share the tips to fix the metrics\_resolution=5s

---

<div class="post-metadata">

**Author:** ![IMP](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/imp/32/20213_2.png) [@IMP](https://forums.percona.com/u/IMP)\
**Post date:** [March 19, 2019, 5:55am UTC](https://forums.percona.com/t/how-to-enable-the-metrics-resolution-5s/6874/5 "2019-03-19T05:55:03Z")

</div>

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.

1. Stop pmm-server container

```auto

# docker stop pmm-server

```

1. Rename it, because it’s better to be safe, than sorry:

```auto

# docker rename pmm-server pmm-server-old

```

1. Create a new pmm-server container linked with pmm-data

```auto

# 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

```

1. 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
