Help build the future of open source observability software Open positions

Check out the open source projects we support Downloads

We cannot remember your choice unless you click the consent notice at the bottom.

Grafana Tutorial: How to Create Kiosks to Display Dashboards on a TV

Grafana Tutorial: How to Create Kiosks to Display Dashboards on a TV

2019-05-02 3 min

##Grafana Kiosk grafana-kiosk

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

Documentation on how to do this is sparse, which inspired this tutorial and also led to automating the process.

  • login
  • switch to kiosk or kiosk-tv mode
  • display the default dashboard 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.

Here’s what we’ll end up with (please note these screenshots include the virtualbox window):

A kiosk displaying the default dashboard on https://play.grafana.org in full screen: kiosk goal1

A kiosk displaying a specific dashboard on https://play.grafana.org in TV mode: kiosk goal2

A kiosk displaying another dashboard on https://play.grafana.org in normal mode: kiosk goal3

A kiosk with a playlist running on https://play.grafana.org in full screen: kiosk goal4

A kiosk using Hosted Grafana login: kiosk goal5

A kiosk using local login: kiosk goal6

Getting Started

This setup uses a Raspberry Pi as the display for the kiosk. It is well-suited for displaying dashboards and is easy to set up. The “launcher” can be used on other devices (Arduino, NUC, etc.) running Linux or MacOS X.

You can also try this out with a VM; RPD will run inside virtualbox. The command will also run on MacOS X.

Raspberry Pi 2 & 3

Any Raspberry Pi can be used; however, this has only been tested with a v2 and v3b+ (and MacOS X Mojave).

To test with a VM, you can download a current version of Debian Stretch with Raspberry Pi Desktop.

For a Pi, use Raspbian Stretch with desktop and recommended software.

Raspbian Stretch with desktop and Raspbian Stretch Lite can also be used. The full install comes with everything you need to get running quickly.

Apply the iso to the sd-card as usual. For MacOS, Etcher.io works great!

Install “Unclutter” Utility

Boot up your Pi, and start a terminal window.

The application “unclutter” is used to keep the mouse point hidden. Install it with this command:

bash
sudo apt-get install unclutter -y

Enable and Start SSH on Pi

bash
sudo systemctl sshd enable
sudo systemctl sshd start
ip addr

Note the ip address output from above.

SSH into Pi

This step can be skipped, but it is much more convenient to interact with the Pi remotely over ssh.

Next ‘ssh’ into the Pi:

bash
ssh pi@ipaddress

The default password is raspberry if you haven’t changed it.

Clone Git Repository

Next, clone the git repository.

bash
git clone https://github.com/grafana/grafana-kiosk

Copy the appropriate binary from grafana-kiosk/bin. It will be one of these:

  • grafana-kiosk.linux.armv5
  • grafana-kiosk.linux.armv6
  • grafana-kiosk.linux.armv7
bash
sudo cp bin/grafana-kiosk.linux.armv7 /usr/bin/grafana-kiosk

Additional binaries are available to run on standard Linux and MacOS:

  • grafana-kiosk.darwin
  • grafana-kiosk.linux.amd64
  • grafana-kiosk.linux.386

Try It Out!

Here are some commands to take it for a spin.

This will take the browser to a playlist on https://play.grafana.org in fullscreen kiosk mode:

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

Running Grafana in Docker locally? Try this:

bash
/usr/bin/grafana-kiosk --URL https://localhost:3000 --login-method local --user admin --password admin --kiosk-mode tv

Have a Hosted Grafana account? Try this, replacing the name of the instance, username, and password as appropriate:

bash
/usr/bin/grafana-kiosk --URL https://GCOM_ACCOUNT.grafana.net --login-method gcom --user GCOM_USER --password GCOM_PASSWORD --kiosk-mode full

Wrapping Up

Hopefully this tutorial and utility will spread more kiosks. Show off yours on Twitter!

TODO

  • Support for OAuth2 logins

References