User auto logout

Hi all,

Probably the dumbest question but cant seem to find the actual timeout setting in the ini for a user. I have a dashboard that I use in full screen but the user (admin at this point) keeps getting logged out. Seems to be a login timeout setting. Could anyone point me to the setting in the ini to either turn it off completely or make it a much longer period of time?

4 Likes

Was thinking couldn’t be something else that keeps logging out my admin user from my Grafana dashboard? Kicks me to login page. Haven’t been able to time it (how long before the kick)

Could be the directive token_rotation_interval_minutes… inside /etc/grafana/grafana.ini ?

The directive:

How often should auth tokens be rotated for authenticated users when being active. The default is each 10 minutes.
;token_rotation_interval_minutes = 10

Remove the semicolon and write the number of minutes you would like.

Could you test it? I am installing in this moment a new instance, saw the directive and remember this post, but I can not try it right now

1 Like

Thank you will test and report back.

That didn’t work :frowning: set it to a year (in minutes) and still keep getting logged out. First thing that happens is in chrome or edge I get the message web page is trying to close - leave or cancel. If I press leave it then goes to log on screen. Press cancel the message comes back uo

Interesting find I was editing a graph and left it open by mistake (visualization) it hasn’t logged me out… If I go back to the dashboard (a bunch of graphs) I get the browser message website wants to close the web page.

Not to sure why in dashboard mode it does this and in edit mode it doesnt

1 Like

Interesting, in edit mode do not log out… seems it could be a little bug.

Did you tried to erease all cookies and web data before test the new log uot time?

I have the same problem since a few upgrades ago and it’s driving me absolutely bonkers. Happens on Safari, Chrome and Firefox all on Mac on the latest versions.

A fix for this would be so very nice.

3 Likes

So it seems to be dashboard specific. What do I mean:
I login as admin it loads my preferred dashboard automatically. After a few mins I get the logout.

If I go from the my default dashboard to say the manage dashboards screen. It doesn’t log me out. Been on the manage dashboard screen for 24hrs now and no log out.

2 Likes

@carlosmagalhaes The exact same thing is happening to me As well. Have you found a solution perhaps?

1 Like

Which version you have ?
I had the same issue and it was fixed, when I did downgrade to 7.0
Iam not sure, as i remember, problem started when I upgrade grafana to 7.2 and still was problem on the test 7.3, so maybe 7.1 too does not have this issue.

I had this logout problem when I upgraded to 7.2.0 I set the following in the .ini to 1 year and no logouts since:

login_maximum_inactive_lifetime_days = 365
token_rotation_interval_minutes = 525600

1 Like

In my case, the auto-logout triggered by other grafana running on the same ip but different port, for the other grafana can change the content of grafana_session cookies.

changing login_cookie_name in grafana.ini solves my problem.

1 Like

popping onto a necrothread to say that this solved it for me. I’m running via Helm, so here’s my config section:

grafana.ini:
[...]
  auth:
    login_cookie_name: grafana_session_my_server_name