Emergency

PMM Docker v1.1.2 not saving grafana.ini changes

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PMM Docker v1.1.2 not saving grafana.ini changes

    Hello, all. I've tried following the blog posting here --> https://www.percona.com/blog/2017/01...m-and-grafana/ to enable SMTP settings in the Docker container.

    However, upon restarting the container, my changes are gone. The file reverts to what it was to begin with. I did some digging on Docker (being a total neophyte to it) and found that perhaps doing "docker commit <container>" might do the trick. No luck.

    How do I get the container to permanently save edits to the grafana.ini file?

    Thanks for any insight on this.

    Cheers!
    -Jim

  • #2
    Hi Jim,

    can you provide steps to reproduce?

    the following commands working fine
    Code:
    % docker exec -it pmm-server vi /etc/grafana/grafana.ini
    % docker exec -it pmm-server grep new-text /etc/grafana/grafana.ini
    some-new-text
    % docker restart pmm-server
    % docker exec -it pmm-server grep new-text /etc/grafana/grafana.ini
    some-new-text

    Comment


    • #3
      Hi, Mykola. Sure, the steps I use are precisely as laid out in the blog post. When I try your commands, I get a strange "truncated" editing window that I'm unable to use or troubleshoot why it doesn't work on my end.

      The commands listed in the blog post don't produce the desired results - that's what my difficulty is. Once I'm able to save changes to that file, I should be fine. All Docker documentation I'm running across seems to say that this file should be an EXTERNAL one, passed with -v at container runtime, so I'm investigating if that will work.

      Thanks for the help, Mykola.

      Cheers!
      -Jim

      Comment


      • #4
        Jim,

        I think it is good idea, you can copy grafana config container to the persistent/safe directory on our server and mount this file inside docker container.
        the following commands should work fine
        Code:
        docker cp pmm-server:/etc/grafana/grafana.ini some-persistent-dir
        vi some-persistent-dir/grafana.ini
        docker stop pmm-server
        docker rm pmm-server
        docker run -d -p 80:80 --volumes-from pmm-data --name pmm-server --restart always -v /global/path/to/some-persistent-dir/grafana.ini:/etc/grafana/grafana.ini percona/pmm-server:1.1.2

        Comment

        Working...
        X