Skip to content

AWS Grafana Kiosk Mode Session Timeout Problem

0

Hi there, we are running Grafana managed by AWS in kiosk mode on a raspberry pi. Our problem is, that every 12 hours the session is cancelled most likely due to a predefined timeout. Is there any possibility to change that timout value to a longer perdiod?

asked 2 years ago681 views

2 Answers
0

there are a couple of options you can explore to extend the session timeout period.

  1. Modify the Grafana Configuration:

    • Grafana allows you to configure the session timeout through its configuration file.
    • The default session timeout in Grafana is usually set to 24 hours, but you can increase this value to suit your needs.
    • Locate the Grafana configuration file, typically named grafana.ini or grafana.yaml, and find the [session] section.
    • Look for the session_lifetime_minutes setting and increase the value to your desired timeout, for example, 24 hours would be 1440.
    • Save the configuration file and restart the Grafana service for the changes to take effect.
  2. Modify the Kiosk Mode Configuration:

    • If you're using a kiosk mode solution, such as Chromium's kiosk mode, the session timeout might be set at the operating system or kiosk application level.
    • Refer to the documentation or configuration options for your specific kiosk mode solution and look for any settings related to session timeouts or screen locking.
    • Increase the session timeout value or disable the screen locking feature to prevent the session from being canceled prematurely.
  3. Use a Raspberry Pi Power Management Solution:

    • Another approach is to use a power management solution for your Raspberry Pi to prevent it from going into sleep mode or turning off the display.
    • There are several power management tools available for Raspberry Pi, such as raspi-config, pm-utils, or systemd power management settings.
    • Configure these tools to keep the Raspberry Pi and the display active, preventing the session from being canceled due to inactivity.
  4. Implement a Session Refresh Mechanism:

    • As a fallback, you could implement a script or a background process that periodically refreshes the Grafana session to prevent it from timing out.
    • This could be done by sending a request to the Grafana API or by interacting with the Grafana web interface to keep the session active.
    • You can schedule this session refresh process to run at regular intervals, ensuring the Grafana session remains active.

Start by trying the first two options, modifying the Grafana configuration and the kiosk mode configuration, as these are the most direct ways to extend the session timeout. If those don't work, consider the power management and session refresh mechanisms as alternative solutions. .

answered 2 years ago

0

Hey,,Marcus

To solve the session timeout issue in AWS Managed Grafana on your Raspberry Pi in kiosk mode, follow these steps:

Check Session Timeout Setting: AWS Managed Grafana automatically times out sessions after a default period (usually 12 hours). You cannot directly change this in AWS Managed Grafana settings.

Workaround - Use Auto-Refresh or Re-login: To avoid session timeouts, set up an auto-refresh feature or use a script to automatically refresh the page before the timeout occurs. You can also use a scheduled re-login script that refreshes the authentication.

Use AWS SSO with a longer session duration: If you're using AWS SSO, consider increasing the session duration in the AWS SSO settings to allow for longer active sessions.

These steps should help you avoid session timeouts in kiosk mode.

EXPERT

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.