The reason you couldn’t run both PMM and Grafana in the same browser is because both use the same name for the authentication cookie, which is
grafana_session as of right now. Naturally, when you log out of one, the session becomes invalid in another.
One way to make PMM and Grafana coexist on the same server and share the same IP address is to change the name of the parameter responsible for setting the cookie name in
/etc/grafana/grafana.ini. You’d want to do it in just one app, say in Grafana, so the two apps would no longer compete for the same cookie.
The parameter in queston is called
login_cookie_name and it can be found in the
[auth] section of
Once your change is saved, don’t forget to uncomment the parameter. So you’d ultimately get to seeing something similar to this:
Finally, if you save the changes and restart the Grafana server, you should be able to launch both in the same browser! In case you want to verify your changes have been picked up by Grafana, you can go to the following url
http://localhost:3000/admin/settings and check if the parameter has the new value you defined earlier, i.e.:
If we want to break down the steps, here they are:
- we assume you launched grafana like this:
docker run -d --name=grafana -p 3000:3000 grafana/grafana
- copy grafana.ini to the host:
docker cp grafana:/etc/grafana/grafana.ini grafana.ini
- uncomment & and set the value of the
login_cookie_name parameter to
my_grafana_session (see screenshot above)
- stop and remove grafana container:
docker stop grafana && docker rm grafana
- start grafana anew while mounting the
grafana.ini file as a volume:
docker run -d --name=grafana -p 3000:3000 -v $(pwd)/grafana.ini:/etc/grafana/grafana.ini grafana/grafana
Please note we don’t recommend you change this parameter in PMM since we may choose to rename it later.
Please let us know if it works for you.