Skip to content

m-ronchi/grafana-kiosk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grafana Kiosk

CircleCI Go Report Card codecov

A very useful feature of Grafana is the ability to display dashboards and playlists on a large TV.

This provides a utility to quickly standup a kiosk on devices like a Raspberry Pi or NUC.

The utitilty provides these options:

  • login
    • to a Grafana server (local account)
    • to a grafana server with anonymous-mode enabled (same method used on https://play.grafana.org)
    • to a hosted grafana instance
  • switch to kiosk or kiosk-tv mode
  • display the default home page set for the user
  • display a specified dashboard
  • start a playlist immediately (inactive mode enable)

Additionally, an initialize option is provided to configure LXDE for Raspberry Pi Desktop.

Usage

--URL

  • URL to a Grafana server

--playlist

  • designates the URL as a playlist, allowing instant "inactive" user vs waiting for the timeout

--login-method (default anon)

  • anon (anonymous)
  • local (local user)
  • gcom (Hosted Grafana)

--username used with local and gcom login methods

--password used with local and gcom login methods

--kiosk-mode

  • full (no sidebar, top navigation disabled)
  • tv (no sidebar, top navigation enabled)
  • disabled (sidebar and top navigation enabled)

--autofit scales panels to fit the display (default is true)

  • true
  • false

--lxde enables initialization of LXDE

--lxde-home specifies home directory of LXDE user (default $HOME)

Hosted Grafana using grafana.com authentication

This will login to a Hosted Grafana instance and take the browser to the default dashboard in fullscreen kiosk mode:

./bin/grafana-kiosk --URL https://bkgann3.grafana.net --login-method gcom --username bkgann --password abc123 --kiosk-mode full

This will login to a Hosted Grafana instance and take the browser to a specific dashboard in tv kiosk mode:

./bin/grafana-kiosk --URL https://bkgann3.grafana.net/dashboard/db/sensu-summary --login-method gcom --username bkgann --password abc123 --kiosk-mode tv

This will login to a Hosted Grafana instance and take the browser to a playlist in fullscreen kiosk mode, and autofit the panels to fill the display.

./bin/grafana-kiosk --URL https://bkgann3.grafana.net/playlists/play/1 --login-method gcom --username bkgann --password abc123 --kiosk-mode full --playlist --autofit

Grafana Server with Local Accounts

This will login to a grafana server that uses local accounts:

./bin/grafana-kiosk --URL https://localhost:3000 --login-method local --username admin --password admin --kiosk-mode tv
./bin/grafana-kiosk --URL https://localhost:3000 --login-method local --username admin --password admin --kiosk-mode tv

Grafana Server with Anonymous access enabled

This will take the browser to the default dashboard on play.grafana.org in fullscreen kiosk mode (no login needed):

./bin/grafana-kiosk --URL https://play.grafana.org --login-method anon --kiosk-mode tv

This will take the browser to a playlist on play.grafana.org in fullscreen kiosk mode (no login needed):

./bin/grafana-kiosk --URL https://play.grafana.org/playlists/play/1 --login-method anon --kiosk-mode tv

Building

A Makefile is provided for building the utility.

make

This will generate executables in "bin" that can be run on a variety of platforms.

TODO

  • Support for OAuth2 logins

References

About

Kiosk Utility for Grafana

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 85.9%
  • Makefile 7.2%
  • Shell 6.9%